Learn how to evaluate and integrate the VNC SDK
EventLoop¶
-
public final class
EventLoop
¶ A container for static methods.
Method Summary¶
Modifier and Type | Method and Description |
---|---|
void |
Runs the SDK event loop. |
void |
Schedules a task for immediate execution on the SDK’s thread. |
boolean |
Returns a boolean flag indicating whether the event loop should stop, and immediately clears it. |
void |
Stops the SDK event loop, causing |
Methods¶
-
public static void
run
() throws InterruptedException¶ Runs the SDK event loop. This function may not be used if the
Library.init
method was called with theANDROID
event loop type; instead Android’s Looper methods must be used to run the loop.The function runs until either the
stop
method is called, or the thread is interrupted.After
stop
has been called, or the thread has been interrupted, it is acceptable to call therun
method again.Throws: - InterruptedException – Thrown when the
Thread.interrupt
method is used to break out of therun
method.
- InterruptedException – Thrown when the
-
public static void
runOnLoop
(Runnable task)¶ Schedules a task for immediate execution on the SDK’s thread. The task will be run during the current or next invocation of EventLoop.run().
-
public static boolean
shouldStop
()¶ Returns a boolean flag indicating whether the event loop should stop, and immediately clears it.
For more information, see
vnc_EventLoop_shouldStop()
.
-
public static void
stop
()¶ Stops the SDK event loop, causing
run
to exit if it is already running, or to exit immediately the next time it is entered if not.This is the only SDK method which may be called on a thread other than the thread which called
Library.init
.