se.lth.cs.realtime.event
Class TriggerEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byse.lth.cs.realtime.event.RTEvent
          extended byse.lth.cs.realtime.event.TriggerEvent
All Implemented Interfaces:
java.io.Serializable

public class TriggerEvent
extends RTEvent

Generic event used to trigger one-shot activities in an event-driven fashion. Some timer thread is useful to generate a single triggering event. For cyclic or periodic events, the class PeriodicEvent is to be used for the periodic events.

A TriggerEvent has no owner. That is, owner is set to null, enabling the event to be sent over and over again from the same source. Subclasses are, however, free to assign ownership simply by assigning the (protected) owner field.

Author:
Klas.Nilsson@cs.lth.se
See Also:
PeriodicEvent, Timer, RTEvent, Serialized Form

Field Summary
 
Fields inherited from class se.lth.cs.realtime.event.RTEvent
owner, ticker, timestamp
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TriggerEvent()
          Constructs an TriggerEvent object with the current thread as source and a timestamp from the current system time.
TriggerEvent(long ts)
          Constructs an TriggerEvent object with the current thread as source and with the specified time stamp.
TriggerEvent(java.lang.Object source)
          Constructs an TriggerEvent object with the specified source object and a timestamp from the current system time.
TriggerEvent(java.lang.Object source, long ts)
          Constructs an TriggerEvent object with the specified source object and time stamp.
TriggerEvent(java.lang.Object source, long ts, Timebase timebase)
          Constructs an TriggerEvent object with the specified source object and time-stamp with respect to the specified time-base.
 
Methods inherited from class se.lth.cs.realtime.event.RTEvent
getMillis, getNanos, getOwner, getSeconds, getTicks, getTimebase, paramString, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TriggerEvent

public TriggerEvent()
Constructs an TriggerEvent object with the current thread as source and a timestamp from the current system time.


TriggerEvent

public TriggerEvent(java.lang.Object source)
Constructs an TriggerEvent object with the specified source object and a timestamp from the current system time.

Parameters:
source - The object where the event originated.

TriggerEvent

public TriggerEvent(long ts)
Constructs an TriggerEvent object with the current thread as source and with the specified time stamp.

Parameters:
ts - The time from which the event originates.

TriggerEvent

public TriggerEvent(java.lang.Object source,
                    long ts)
Constructs an TriggerEvent object with the specified source object and time stamp.

Parameters:
source - The object where the event originated.
ts - The time from which the event originates.

TriggerEvent

public TriggerEvent(java.lang.Object source,
                    long ts,
                    Timebase timebase)
Constructs an TriggerEvent object with the specified source object and time-stamp with respect to the specified time-base.

Parameters:
source - The object where the event originated.
ts - The time from which the event originates.