|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.freehep.record.loop.event.ChainableRecordAdapter | +--org.freehep.record.loop.event.ChainableRecordListenerDecorator
This class decorates an
object so
that the methods of another RecordListener
RecordListener
object are
executed in succession to its own method, thus creating a chain of listeners.
Constructor Summary | |
ChainableRecordListenerDecorator(RecordListener decorated)
Create an instance of this class that decorates the specified object. |
Method Summary | |
void |
addRecordListener(RecordListener listener)
Adds the specified RecordListener to this object. |
void |
configure(ConfigurationEvent event)
Tells this object to configure itself in preparation for the first recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent) call. |
void |
finish(RecordEvent event)
Tells this object that an SequentialRecordLoop to which is has been added has been disposed of, and this object should execute any housekeeping tasks trelated to its participation in this SequentialRecordLoop. |
RecordListener |
getDecoratedListener()
Returns the RecordListener that this object decorates. |
RecordListener |
getRecordListener()
Returns the RecordListener which is executed after this object. null is returned if no listener succeeds this object listener. |
void |
reconfigure(ConfigurationEvent event)
Tells this object to reconfigure itself in preparation for a new set of recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent) calls. |
void |
recordSupplied(RecordSuppliedEvent event)
Called every time a new record is read by the SequentialRecordLoop's SequentialRecordSource object. |
void |
removeRecordListener(RecordListener listener)
Removes the specified listener from this object if it is this objects listener, otherwise it does nothing. |
void |
resume(RecordEvent event)
Tells this object to prepare for a new set of recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent)
calls using the its existing configuration. |
void |
suspend(RecordEvent event)
Tells this object that there will be either a resume(org.freehep.record.loop.event.RecordEvent) or
reconfigure(org.freehep.record.loop.event.ConfigurationEvent) before any more recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent) calls will
be made. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChainableRecordListenerDecorator(RecordListener decorated)
decorated
- the RecordListener to be decorated.
IllegalArgumentException
- if decorated is null.Method Detail |
public void configure(ConfigurationEvent event)
RecordListener
RecordListener.recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent)
call.
configure
in interface RecordListener
configure
in class org.freehep.record.loop.event.ChainableRecordAdapter
event
- a ConfigurationEvent describing the configuration to use.public void finish(RecordEvent event)
RecordListener
finish
in interface RecordListener
finish
in class org.freehep.record.loop.event.ChainableRecordAdapter
event
- the RecordEvent for this event.public RecordListener getDecoratedListener()
public void recordSupplied(RecordSuppliedEvent event)
RecordListener
recordSupplied
in interface RecordListener
recordSupplied
in class org.freehep.record.loop.event.ChainableRecordAdapter
event
- a RecordSuppliedEvent describing the data supplied.public void reconfigure(ConfigurationEvent event)
RecordListener
RecordListener.recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent)
calls.
reconfigure
in interface RecordListener
reconfigure
in class org.freehep.record.loop.event.ChainableRecordAdapter
event
- a ConfigurationEvent describing the new configuration to
use.public void resume(RecordEvent event)
recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent)
calls using the its existing configuration.
resume
in interface RecordListener
resume
in class org.freehep.record.loop.event.ChainableRecordAdapter
event
- the RecordEvent for this event.
IllegalStateException
- if the listener is new and has not been
handed at least on record already.public void suspend(RecordEvent event)
RecordListener
RecordListener.resume(org.freehep.record.loop.event.RecordEvent)
or
RecordListener.reconfigure(org.freehep.record.loop.event.ConfigurationEvent)
before any more RecordListener.recordSupplied(org.freehep.record.loop.event.RecordSuppliedEvent)
calls will
be made.
suspend
in interface RecordListener
suspend
in class org.freehep.record.loop.event.ChainableRecordAdapter
event
- the RecordEvent for this event.public void addRecordListener(RecordListener listener) throws TooManyListenersException
RecordListenerManager
addRecordListener
in interface RecordListenerManager
listener
- the RecordListener to add.
TooManyListenersException
- if a listener is already present.RecordListenerManager.removeRecordListener(org.freehep.record.loop.event.RecordListener)
public RecordListener getRecordListener()
getRecordListener
in interface RecordListenerManager
public void removeRecordListener(RecordListener listener)
RecordListenerManager
removeRecordListener
in interface RecordListenerManager
listener
- the RecordListener to remove.RecordListenerManager.addRecordListener(org.freehep.record.loop.event.RecordListener)
|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |