UM .NET API  6.16
com.latencybusters.lbm.LBMTimer Class Reference

LBM Timer class. More...

Inheritance diagram for com.latencybusters.lbm.LBMTimer:

Classes

struct  event_queue_cancel_callback_delegate_wrapper_t
 
struct  lbm_event_queue_cancel_cb_info_t
 

Public Member Functions

 LBMTimer (LBMContext lbmctx, long milliseconds)
 Creates a timer associated with a specific context that expires with a specified delay. More...
 
 LBMTimer (LBMContext lbmctx, long milliseconds, LBMEventQueue lbmevq)
 Creates a timer associated with a specific context and event queue that expires with a specified delay. More...
 
 LBMTimer (LBMContext lbmctx, long milliseconds, LBMTimerCallback cb, Object cbArg)
 Creates a timer associated with a specific context that expires with a specified delay. More...
 
 LBMTimer (LBMContext lbmctx, long milliseconds, LBMTimerCallback cb, Object cbArg, LBMEventQueue lbmevq)
 Creates a timer associated with a specific context and event queue that expires with a specified delay. More...
 
void addTimerCallback (LBMTimerCallback cb)
 Register a timer callback. More...
 
void addTimerCallback (LBMTimerCallback cb, Object cbArg)
 Register a timer callback (and callback token) More...
 
void removeTimerCallback (LBMTimerCallback cb)
 Deregister a timer callback. More...
 
void removeTimerCallback (LBMTimerCallback cb, Object cbArg)
 Deregister a timer callback. More...
 
void cancel ()
 Cancel timer. More...
 
void reschedule (long milliseconds)
 Reschedule this timer to expire in a specified number of milliseconds. More...
 
void Dispose ()
 Dispose of this timer object.
 

Detailed Description

LBM Timer class.

Constructor & Destructor Documentation

com.latencybusters.lbm.LBMTimer.LBMTimer ( LBMContext  lbmctx,
long  milliseconds 
)

Creates a timer associated with a specific context that expires with a specified delay.

A zero duration timer is legal and causes the associated callback to be called as soon as possible on the context thread.

Parameters
lbmctxLBMContext object with which to associate this timer (determines which LBM thread will execute the timer function)
millisecondsNumber of milliseconds until the timer expires
com.latencybusters.lbm.LBMTimer.LBMTimer ( LBMContext  lbmctx,
long  milliseconds,
LBMEventQueue  lbmevq 
)

Creates a timer associated with a specific context and event queue that expires with a specified delay.

A zero duration timer is legal and causes the associated callback to be called as soon as possible on the context thread or to be enqueued as an event on the associated event queue. In this case, the event queue dispatching thread calls the associated callback after all currently pending events have been dispatched.

Parameters
lbmctxLBMContext object with which to associate this timer (determines which LBM thread will execute the timer function)
millisecondsNumber of milliseconds until the timer expires
lbmevqEvent queue with which to associate this timer (the timer events will be posted to this event queue)
com.latencybusters.lbm.LBMTimer.LBMTimer ( LBMContext  lbmctx,
long  milliseconds,
LBMTimerCallback  cb,
Object  cbArg 
)

Creates a timer associated with a specific context that expires with a specified delay.

A zero duration timer is legal and causes the associated callback to be called as soon as possible on the context thread.

Parameters
lbmctxLBMContext object with which to associate this timer (determines which LBM thread will execute the timer function)
millisecondsNumber of milliseconds until the timer expires
cbCallback implementing the LBMTimerCallback delegate interface
cbArgCallback object passed as token to callback interface
com.latencybusters.lbm.LBMTimer.LBMTimer ( LBMContext  lbmctx,
long  milliseconds,
LBMTimerCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
)

Creates a timer associated with a specific context and event queue that expires with a specified delay.

A zero duration timer is legal and causes the associated callback to be called as soon as possible on the context thread or to be enqueued as an event on the associated event queue. In this case, the event queue dispatching thread calls the associated callback after all currently pending events have been dispatched.

Parameters
lbmctxLBMContext object with which to associate this timer (determines which LBM thread will execute the timer function)
millisecondsNumber of milliseconds until the timer expires
cbCallback implementing the LBMTimerCallback delegate interface
cbArgCallback object passed as token to callback interface
lbmevqEvent queue with which to associate this timer
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function.

References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().

Member Function Documentation

void com.latencybusters.lbm.LBMTimer.addTimerCallback ( LBMTimerCallback  cb)

Register a timer callback.

See also
LBMTimerCallback
removeTimerCallback
Parameters
cbCallback implementing the LBMTimerCallback delegate interface

Referenced by com.latencybusters.lbm.LBMContext.scheduleTimer().

void com.latencybusters.lbm.LBMTimer.addTimerCallback ( LBMTimerCallback  cb,
Object  cbArg 
)

Register a timer callback (and callback token)

See also
LBMTimerCallback
removeTimerCallback
Parameters
cbCallback implementing the LBMTimerCallback delegate interface
cbArgCallback token object
void com.latencybusters.lbm.LBMTimer.cancel ( )

Cancel timer.

Exceptions
com.latencybusters.lbm.LBMExceptionInvalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function.

References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().

void com.latencybusters.lbm.LBMTimer.removeTimerCallback ( LBMTimerCallback  cb)

Deregister a timer callback.

See also
LBMTimerCallback
addTimerCallback
Parameters
cbPreviously registered callback implementing the LBMTimerCallback delegate interface
void com.latencybusters.lbm.LBMTimer.removeTimerCallback ( LBMTimerCallback  cb,
Object  cbArg 
)

Deregister a timer callback.

See also
LBMTimerCallback
addTimerCallback
Parameters
cbPreviously registered callback implementing the LBMTimerCallback delegate interface
cbArgCallback token for previously registered callback

References com.latencybusters.lbm.LBMTimerCallback().

void com.latencybusters.lbm.LBMTimer.reschedule ( long  milliseconds)

Reschedule this timer to expire in a specified number of milliseconds.

Parameters
millisecondsNumber of milliseconds until this timer should expire
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function.

References com.latencybusters.lbm.LBM.errorMessage(), com.latencybusters.lbm.LBM.errorNumber(), and com.latencybusters.lbm.LBMTimerCallback().

Referenced by com.latencybusters.lbm.LBMContext.scheduleTimer().


The documentation for this class was generated from the following file: