fulmine.event.listener
Class ActiveAsymmetricEventProcessor

java.lang.Object
  extended by fulmine.AbstractLifeCycle
      extended by fulmine.model.component.AbstractComponent
          extended by fulmine.event.EventSource
              extended by fulmine.event.listener.AsymmetricEventProcessor
                  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class fulmine.event.listener.AsymmetricEventProcessor
AsymmetricEventProcessor.Result
 
Field Summary
 
Fields inherited from class fulmine.event.listener.AsymmetricEventProcessor
drivenEvents, driverEvents
 
Constructor Summary
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.
 
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.event.listener.AsymmetricEventProcessor
getDrivenSources, getDriverSource, getLog, toDetailedString, toString, update
 
Methods inherited from class fulmine.event.EventSource
doReadState, doWriteState
 
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
 
Methods inherited from class fulmine.AbstractLifeCycle
checkActive, destroy, finalize, isActive, start
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fulmine.event.IEventSource
addEvent, addListener, getEventSourceGroupId, getListeners, removeListener, removeListeners
 
Methods inherited from interface fulmine.IDescriptor
toIdentityString
 
Methods inherited from interface fulmine.ILifeCycle
isActive, start
 
Methods inherited from interface fulmine.IDestroyable
destroy
 
Methods inherited from interface fulmine.IAddressable
getAddress, getDomain, getIdentity, getType
 

Constructor Detail

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 use
driverEventTypeFilter - The event filter for driver events, defines the event types from the driver source that are processed
driverSource - the driver IEventSource
drivenEventTypeFilter - The event filter for driven events, defines the event types from the driven sources that are processed
drivenSources - the driven IEventSource objects that will generate events as a result of the driver source events.
Method Detail

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.