public class IdleHandle extends Handle
PrepareCallback handles.
See Idle handle
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the handle and free up any resources that may be held by it.
|
void |
setCloseCallback(CloseCallback callback)
Attach a
CloseCallback. |
void |
setIdleCallback(IdleCallback callback)
Attach a
IdleCallback. |
int |
start()
Starts the idle handle with the callback specified
setIdleCallback(IdleCallback). |
int |
stop()
Stop the handle, the callback will no longer be called.
|
public void setIdleCallback(IdleCallback callback)
IdleCallback.callback - A Callback, which will be invoked once per loop
iteration, right before the PrepareCallback
handles.public void setCloseCallback(CloseCallback callback)
CloseCallback.callback - A Callback, which will be invoked when check handle is
closed.IllegalStateException - if this method called more than once.public int start()
setIdleCallback(IdleCallback).0 on success, or an error code < 0 on failure.public int stop()
0 on success, or an error code < 0 on failure.public void close()
Copyright © 2021 WebFolder. All rights reserved.