|
| void | setLastState (List< Object > value) |
| |
| Integer | pRegister (Object sender, String method, Object... condition) |
| |
| Boolean | pUpdateRegister (Integer idx, Object sender, String method, Object... condition) |
| |
| void | run (Hashtable< Object, Object > nFunct, Integer idx, List< Object > fArgs) |
| |
| void | lockListProcess (List< Object > fArgs) |
| |
TuxEventHandler is an event controller which give to you the mechanisms to make interactive an asynchronous signal.
- Author
- Remi Jocaille
- Version
- 0.0.3
◆ TuxEventHandler()
| com.tuxisalive.api.TuxEventHandler.TuxEventHandler |
( |
| ) |
|
◆ clearContext()
| void com.tuxisalive.api.TuxEventHandler.clearContext |
( |
| ) |
|
This method clear the configuration of the linked callbacks. In addition with the "storeContext" and "restoreContext" methods, you can manages the context of the event handler.
◆ clearPending()
| void com.tuxisalive.api.TuxEventHandler.clearPending |
( |
| ) |
|
◆ destroy()
| void com.tuxisalive.api.TuxEventHandler.destroy |
( |
| ) |
|
◆ emit()
| void com.tuxisalive.api.TuxEventHandler.emit |
( |
Object... |
args | ) |
|
Emit a signal on the event handler with a set of parameters.
- Parameters
-
◆ getLastState()
| List<Object> com.tuxisalive.api.TuxEventHandler.getLastState |
( |
| ) |
|
Get the last knowed state of the event/status.
- Returns
- The last knowed state.
◆ lockListProcess()
| void com.tuxisalive.api.TuxEventHandler.lockListProcess |
( |
List< Object > |
fArgs | ) |
|
|
private |
◆ notify()
| void com.tuxisalive.api.TuxEventHandler.notify |
( |
Object... |
args | ) |
|
Emit a signal on the event handler with a set of parameters.
- Parameters
-
◆ pRegister()
| Integer com.tuxisalive.api.TuxEventHandler.pRegister |
( |
Object |
sender, |
|
|
String |
method, |
|
|
Object... |
condition |
|
) |
| |
|
private |
◆ pUpdateRegister()
| Boolean com.tuxisalive.api.TuxEventHandler.pUpdateRegister |
( |
Integer |
idx, |
|
|
Object |
sender, |
|
|
String |
method, |
|
|
Object... |
condition |
|
) |
| |
|
private |
◆ register() [1/3]
| Integer com.tuxisalive.api.TuxEventHandler.register |
( |
Integer |
idx, |
|
|
Object |
sender, |
|
|
String |
method, |
|
|
Object... |
condition |
|
) |
| |
Register another callback at the place of a previous index. The "condition" is the rule to match the callback event with a specific set of parameters when a signal is emitted. The number of objects from the condition need to be the same than the parameters of the emitted signal.
- Parameters
-
| idx | the index of the callback |
| sender | parent object of the method. |
| method | method name as string. |
| condition | object array of the condition. |
- Returns
- the index of the callback in the handler.
◆ register() [2/3]
| Integer com.tuxisalive.api.TuxEventHandler.register |
( |
Object |
sender, |
|
|
String |
method |
|
) |
| |
Register a callback function.
- Parameters
-
| sender | parent object of the method. |
| method | method name as string. |
- Returns
- the index of the callback in the handler.
◆ register() [3/3]
| Integer com.tuxisalive.api.TuxEventHandler.register |
( |
Object |
sender, |
|
|
String |
method, |
|
|
Object... |
condition |
|
) |
| |
Register a callback function. The "condition" is the rule to match the callback event with a specific set of parameters when a signal is emitted. The number of objects from the condition need to be the same than the parameters of the emitted signal.
- Parameters
-
| sender | parent object of the method. |
| method | method name as string. |
| condition | object array of the condition. |
- Returns
- the index of the callback in the handler.
◆ restoreContext()
| void com.tuxisalive.api.TuxEventHandler.restoreContext |
( |
| ) |
|
This method restore from a stack the configuration of the linked callbacks. In addition with the "storeContext" and "clearContext" methods, you can manages the context of the event handler.
◆ run()
| void com.tuxisalive.api.TuxEventHandler.run |
( |
Hashtable< Object, Object > |
nFunct, |
|
|
Integer |
idx, |
|
|
List< Object > |
fArgs |
|
) |
| |
|
private |
◆ setLastState()
| void com.tuxisalive.api.TuxEventHandler.setLastState |
( |
List< Object > |
value | ) |
|
|
private |
Set the state of the event.
- Parameters
-
◆ storeContext()
| void com.tuxisalive.api.TuxEventHandler.storeContext |
( |
| ) |
|
This method store in a stack the configuration of the linked callbacks. In addition with the "restoreContext" and "clearContext" methods, you can manages the context of the event handler.
◆ unregister()
| void com.tuxisalive.api.TuxEventHandler.unregister |
( |
Integer |
idx | ) |
|
Unregister a callback from the event handler.
- Parameters
-
| idx | index of the callback. |
◆ updateState()
| void com.tuxisalive.api.TuxEventHandler.updateState |
( |
List< Object > |
state | ) |
|
Update the state of the event without throwing callback.
- Parameters
-
◆ waitCondition()
| Boolean com.tuxisalive.api.TuxEventHandler.waitCondition |
( |
Double |
timeout, |
|
|
Object... |
condition |
|
) |
| |
Synchronize a condition with a specific event.
- Parameters
-
| timeout | maximal delay to wait. |
| condition | object array of the condition. |
- Returns
- the success of the waiting.
◆ fifoList
| List<Object> com.tuxisalive.api.TuxEventHandler.fifoList |
|
private |
◆ functStructList
| List<Object> com.tuxisalive.api.TuxEventHandler.functStructList |
|
private |
◆ lastState
| List<Object> com.tuxisalive.api.TuxEventHandler.lastState |
|
private |
◆ lastStateMutex
| SLock com.tuxisalive.api.TuxEventHandler.lastStateMutex |
|
private |
◆ listMutex
| SLock com.tuxisalive.api.TuxEventHandler.listMutex |
|
private |
◆ lockList
| List<Object> com.tuxisalive.api.TuxEventHandler.lockList |
|
private |
◆ lockMutex
| SLock com.tuxisalive.api.TuxEventHandler.lockMutex |
|
private |
The documentation for this class was generated from the following file: