fulmine.event.listener
Class ActiveAsymmetricEventProcessor
java.lang.Object
fulmine.AbstractLifeCycle
fulmine.model.component.AbstractComponent
fulmine.event.EventSource
fulmine.event.listener.AsymmetricEventProcessor
fulmine.event.listener.ActiveAsymmetricEventProcessor
- All Implemented Interfaces:
- IEvent, IEventSource, IAddressable, IDescriptor, IDestroyable, ILifeCycle, IComponent, IWireState, Cloneable
public abstract class ActiveAsymmetricEventProcessor
- extends AsymmetricEventProcessor
An active variant of the AsymmetricEventProcessor
. The processor has
a ITaskExecutor
to handle the AsymmetricEventProcessor.update(IEvent, java.util.List)
method. This is useful for situations where this method might block and thus
would tie up the context's processor.
- Author:
- Ramon Servadei
Method Summary |
protected void |
doComponentDestroy()
Unregisters listeners from the context. |
protected void |
doStart()
Overridden in subclasses to perform custom logic on activation. |
Methods inherited from class fulmine.model.component.AbstractComponent |
addEvent, addListener, checkClone, clone, createIdentityString, doDestroy, doPostAddListener, doPostRemoveListener, equals, getAddress, getAddressable, getDomain, getDrivingFrame, getEventSourceGroupId, getFrame, getIdentity, getIdentityString, getListeners, getSource, getTriggerEvent, getType, hashCode, isClone, readState, removeListener, removeListeners, setDrivingFrame, setFrame, setTriggerEvent, toIdentityString, writeState |
ActiveAsymmetricEventProcessor
public ActiveAsymmetricEventProcessor(IFulmineContext context,
Class<? extends IEvent>[] driverEventTypeFilter,
IEventSource driverSource,
Class<? extends IEvent>[] drivenEventTypeFilter,
IEventSource... drivenSources)
- Construct the active processor for the asymmetric event driving
relationship.
- Parameters:
context
- the context this processor should usedriverEventTypeFilter
- The event filter for driver events, defines the event types
from the driver source that are processeddriverSource
- the driver IEventSource
drivenEventTypeFilter
- The event filter for driven events, defines the event types
from the driven sources that are processeddrivenSources
- the driven IEventSource
objects that will generate
events as a result of the driver source events.
doStart
protected void doStart()
- Description copied from class:
AbstractLifeCycle
- Overridden in subclasses to perform custom logic on activation. Any
exceptions should be thrown as a
RuntimeException
or subclass
thereof. When this method is called, the AbstractLifeCycle.isActive()
method will
return true
.
- Overrides:
doStart
in class AsymmetricEventProcessor
doComponentDestroy
protected void doComponentDestroy()
- Description copied from class:
AsymmetricEventProcessor
- Unregisters listeners from the context.
- Overrides:
doComponentDestroy
in class AsymmetricEventProcessor
Copyright © 2007-2009. All Rights Reserved.