Learn how to evaluate and integrate the VNC SDK

We're here if you need help.

EventLoop

public final class EventLoop

A container for static methods.

Method Summary

Modifier and Type Method and Description
void

run()

Runs the SDK event loop.

boolean

shouldStop()

Returns a boolean flag indicating whether the event loop should stop, and immediately clears it.

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.

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 the ANDROID 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 the run method again.

Throws:
  • InterruptedException – Thrown when the Thread.interrupt method is used to break out of the run method.
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.

×