public class LoopEvent extends EventObject
RecordLoop
to LoopListener
s.
An event represents an immutable snapshot of the loop at the moment when the event was created.Constructor and Description |
---|
LoopEvent(RecordLoop loop,
RecordLoop.Event type,
RecordLoop.State state,
RecordLoop.Command command,
Object[] commandParameters,
Throwable exception,
boolean pauseRequested,
boolean stopRequested,
long supplied,
long totalSupplied,
long consumed,
long totalConsumed,
long countableConsumed,
long totalCountableConsumed,
long timeInLoop) |
Modifier and Type | Method and Description |
---|---|
RecordLoop.Command |
getCommand()
Returns the command that was being executed or had just finished executing.
|
Object[] |
getCommandParameters()
Returns a reference to the array containing parameters of the command that
was being executed or had just finished executing.
|
long |
getConsumed()
|
long |
getCountableConsumed()
|
RecordLoop.Event |
getEventType()
Returns the type of this event.
|
Throwable |
getException()
Returns the exception thrown while executing the last command.
|
RecordLoop |
getSource()
Returns the record loop that fired this event.
|
RecordLoop.State |
getState()
Returns the state of the loop when this event was fired.
|
long |
getSupplied()
|
long |
getTimeInLoop()
Returns the duration of the latest
LOOPING phase, in milliseconds. |
long |
getTotalConsumed()
Returns the number of records consumed by listeners since the last
START event. |
long |
getTotalCountableConsumed()
Returns the number of countable records consumed by listeners since the last
START event. |
long |
getTotalSupplied()
Returns the number of records supplied to listeners since the last
START event. |
boolean |
isPauseRequested()
|
boolean |
isStopRequested()
|
toString
public LoopEvent(RecordLoop loop, RecordLoop.Event type, RecordLoop.State state, RecordLoop.Command command, Object[] commandParameters, Throwable exception, boolean pauseRequested, boolean stopRequested, long supplied, long totalSupplied, long consumed, long totalConsumed, long countableConsumed, long totalCountableConsumed, long timeInLoop)
public RecordLoop getSource()
getSource
in class EventObject
public RecordLoop.Event getEventType()
public RecordLoop.State getState()
public RecordLoop.Command getCommand()
public Object[] getCommandParameters()
Callers should not modify the array or its contents to avoid altering the behavior of the loop, possibly in an unpredictable way.
public boolean isPauseRequested()
public boolean isStopRequested()
public Throwable getException()
public long getSupplied()
public long getTotalSupplied()
START
event.public long getConsumed()
public long getTotalConsumed()
START
event.public long getCountableConsumed()
public long getTotalCountableConsumed()
START
event.public long getTimeInLoop()
LOOPING
phase, in milliseconds.Copyright © 2000-2012 FreeHEP. All Rights Reserved.