org.jactr.core.queue
Interface ITimedEvent

All Known Subinterfaces:
IBufferBasedTimedEvent, IIntermediateTimedEvent
All Known Implementing Classes:
AbstractEfferentTimedEvent, AbstractTimedEvent, BlockingTimedEvent, DelayedBufferInsertionTimedEvent, DelayedBufferRequestTimedEvent, DelayedIndirectBufferRequestTimedEvent, FutureChunkInsertionTimedEvent, FutureChunkPatternInsertionTimedEvent, ModifyAction.ModifyActionTimedEvent, MotorTimedEvent, ReencodingTimedEvent, RemoveAction.RemoveActionTimedEvent, RunnableTimedEvent, SetAction.SetActionTimedEvent, TerminationTimedEvent

public interface ITimedEvent

TimedEvent is any event that will occur after X amount of model time. The TimedEvents are queued up on the TimedEventQueue which is processed for each cycle of the model run.

Author:
harrison

Method Summary
 void abort()
          called when the event is to be aborted.
 void fire(double currentTime)
          called when this event should be fired..
 double getEndTime()
          When the event should be fired.
 double getStartTime()
          when the TimedEvent was posted in simulated time.
 boolean hasAborted()
          has this been aborted? aborted events will not be fired
 boolean hasFired()
           
 

Method Detail

getStartTime

double getStartTime()
when the TimedEvent was posted in simulated time.

Returns:
The startTime value

getEndTime

double getEndTime()
When the event should be fired. When the model's simulated time has reached this point, the event will be fired by calling fire

Returns:
The endTime value

fire

void fire(double currentTime)
called when this event should be fired.. This is always called on the model's thread, and so unless someone has violated the accessibility contract, no other thread should be monkeying around with the model's internals


abort

void abort()
called when the event is to be aborted. While the event will be marked as unfirable, it will remain in the timed event queue until its end time is reached


hasAborted

boolean hasAborted()
has this been aborted? aborted events will not be fired

Returns:

hasFired

boolean hasFired()