|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fulmine.AbstractLifeCycle fulmine.event.subscription.SubscriptionManager fulmine.model.container.subscription.ContainerSubscriptionManager
public class ContainerSubscriptionManager
Standard implementation of an ISubscriptionManager
for
IContainer
subscriptions. This is thread safe.
Registers for the following system events:
ContainerSubscription
Field Summary | |
---|---|
protected ILifeCycleEventListener |
eventHandler
|
Constructor Summary | |
---|---|
ContainerSubscriptionManager(IFrameworkContext context)
Standard constructor |
|
ContainerSubscriptionManager(IFrameworkContext context,
ISubscriptionFactory factory)
Standard constructor |
Method Summary | |
---|---|
protected void |
doAddListener(ISubscriptionParameters parameters,
IEventListener listener)
Called as the final step in SubscriptionManager.addListener(ISubscriptionParameters, IEventListener) . |
protected void |
doDestroy()
Overridden in subclasses to perform custom logic on destruction. |
protected void |
doEventSourceCreated(IAddressable identity)
Called as the final step in the SubscriptionManager.eventSourceCreated(IAddressable)
method. |
protected boolean |
doEventSourceExists(IAddressable id)
Template method to identify if the IEventSource identified by the
IAddressable argument exists. |
protected IEventSource |
doGetEventSource(IAddressable id)
Template method to get the IEventSource identified by the
IAddressable argument. |
protected Collection<? extends IEventSource> |
doGetEventSources()
Template method to get the collection of IEventSource instances
the manager will operate over. |
protected void |
doStart()
Overridden in subclasses to perform custom logic on activation. |
protected AsyncLog |
getLog()
Get the log to use for the object hierarchy |
Methods inherited from class fulmine.event.subscription.SubscriptionManager |
---|
addListener, doRaiseSubscribeEvent, doRaiseUnsubscribeEvent, eventSourceCreated, eventSourceDestroyed, getContext, getListeners, getSubscribedSources, getSubscribedSources, getSubscription, getSubscriptions, includes, isSubscribed, removeListener, subscribe, toString, unsubscribe |
Methods inherited from class fulmine.AbstractLifeCycle |
---|
checkActive, destroy, finalize, isActive, start |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface fulmine.ILifeCycle |
---|
isActive, start |
Methods inherited from interface fulmine.IDestroyable |
---|
destroy |
Field Detail |
---|
protected ILifeCycleEventListener eventHandler
Constructor Detail |
---|
public ContainerSubscriptionManager(IFrameworkContext context)
context
- the context this manager is associated withpublic ContainerSubscriptionManager(IFrameworkContext context, ISubscriptionFactory factory)
context
- the context this manager is associated withfactory
- the container subscription factory to useMethod Detail |
---|
protected final void doEventSourceCreated(IAddressable identity)
SubscriptionManager
SubscriptionManager.eventSourceCreated(IAddressable)
method. This provides sub-classes with an opportunity to perform any post
creation work.
doEventSourceCreated
in class SubscriptionManager
protected void doAddListener(ISubscriptionParameters parameters, IEventListener listener)
SubscriptionManager
SubscriptionManager.addListener(ISubscriptionParameters, IEventListener)
.
Sub-classes can perform necessary closure work when the listener is
added.
doAddListener
in class SubscriptionManager
parameters
- the subscription parameters identifying the subscripion(s)listener
- the listener addedprotected IEventSource doGetEventSource(IAddressable id)
IEventSource
identified by the
IAddressable
argument.
doGetEventSource
in class SubscriptionManager
id
- identifies the event source
IEventSource
implementation to useprotected boolean doEventSourceExists(IAddressable id)
IEventSource
identified by the
IAddressable
argument exists.
doEventSourceExists
in class SubscriptionManager
id
- identifies the event source
true
if the container exists in the current context
scopeprotected final void doStart()
AbstractLifeCycle
RuntimeException
or subclass
thereof. When this method is called, the AbstractLifeCycle.isActive()
method will
return true
.
doStart
in class AbstractLifeCycle
protected void doDestroy()
AbstractLifeCycle
RuntimeException
or subclass
thereof.
doDestroy
in class SubscriptionManager
protected AsyncLog getLog()
AbstractLifeCycle
getLog
in class SubscriptionManager
protected Collection<? extends IEventSource> doGetEventSources()
SubscriptionManager
IEventSource
instances
the manager will operate over.
doGetEventSources
in class SubscriptionManager
IEventSource
instances
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |