aicas logoJamaica 6.4 release 1

javax.realtime
Class OneShotTimer

java.lang.Object
  extended by javax.realtime.AsyncEvent
      extended by javax.realtime.Timer
          extended by javax.realtime.OneShotTimer

public class OneShotTimer
extends Timer

Jamaica Real-Time Specification for Java class OneShotTimer.

This event will fire once at a specified time.


Constructor Summary
OneShotTimer(HighResolutionTime time, AbstractAsyncEventHandler handler)
          Constructor to create an instance with given time and handler.
OneShotTimer(HighResolutionTime time, AsyncEventHandler handler)
          Constructor to create an instance with given time and handler.
OneShotTimer(HighResolutionTime start, Clock clock, AbstractAsyncEventHandler handler)
          Constructor to create an instance with given time, clock and handler.
OneShotTimer(HighResolutionTime start, Clock clock, AsyncEventHandler handler)
          Constructor to create an instance with given time, clock and handler.
 
Method Summary
 
Methods inherited from class javax.realtime.Timer
createReleaseParameters, destroy, disable, enable, fire, getClock, getFireTime, getFireTime, isRunning, reschedule, start, start, stop
 
Methods inherited from class javax.realtime.AsyncEvent
addHandler, addHandler, bindTo, handledBy, handledBy, removeHandler, removeHandler, setHandler, setHandler, unbindTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneShotTimer

public OneShotTimer(HighResolutionTime time,
                    AbstractAsyncEventHandler handler)
Constructor to create an instance with given time and handler.

Parameters:
time - The time when this timer should fire. May be null, in this case this is equal to new RelativeTime(0, 0) and the firing will occur immediately after a call to start().
handler - The handler that will be released when this timer fires. May be null to have no handler until one will be added via addHandler.
Throws:
IllegalArgumentException - if time is a negative RelativeTime.

OneShotTimer

public OneShotTimer(HighResolutionTime time,
                    AsyncEventHandler handler)
Constructor to create an instance with given time and handler.

This method has been replaced in RTSJ 2.0 to support the more generic AbstractAsyncEventHandler and is kept for binary compatibility.

See Also:
OneShotTimer(HighResolutionTime, AbstractAsyncEventHandler)

OneShotTimer

public OneShotTimer(HighResolutionTime start,
                    Clock clock,
                    AbstractAsyncEventHandler handler)
Constructor to create an instance with given time, clock and handler.

Parameters:
start - The time when this timer should fire. May be null, in this case this is equal to new RelativeTime(0, 0) and the firing will occur immediately after a call to start().
clock - the clock this timer should be based upon. May be null to use the default System.getRealtimeClock().
handler - The handler that will be released when this timer fires. May be null to have no handler until one will be added via addHandler.
Throws:
IllegalArgumentException - if time is a negative RelativeTime.

OneShotTimer

public OneShotTimer(HighResolutionTime start,
                    Clock clock,
                    AsyncEventHandler handler)
Constructor to create an instance with given time, clock and handler.

This method has been replaced in RTSJ 2.0 to support the more generic AbstractAsyncEventHandler and is kept for binary compatibility.

See Also:
OneShotTimer(HighResolutionTime, Clock, AbstractAsyncEventHandler)

aicas logoJamaica 6.4 release 1

aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2015 aicas GmbH. All Rights Reserved.