Class WebSocketServer
java.lang.Object
com.iizigo.comm.WebSocketServer
The Web Socket Server of iiziGo inside Eclipse.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose of the server.static WebSocketServerGets the instance of the Web Socket Server.static PanelEditorTransactionProcessor[]Gets the list of available panel editors.static WorkerGets the worker instance.static booleanChecks if the server is started.static StringRegisters a transaction processor used for device connections.static voidUnregisters a transaction processor used for device connections.
Method Details
getInstance
Gets the instance of the Web Socket Server.- Throws:
Throwable- For start errors.
getWorker
Gets the worker instance. The first call creates the worker and starts its thread.The started callback is called once the thread of the worker has started, whichever call created the worker: by that thread before it processes the worker, when it has not started yet, otherwise at once by the calling thread, before this method returns. It is called without the lock of this class held; what it throws on the worker's thread is logged and does not stop the worker.
- Parameters:
startedCallback- Callback for started, null for none.- Returns:
- The worker, never null.
- Throws:
IOException- If the worker cannot be created.
isStarted
public static boolean isStarted()Checks if the server is started.registerTransactionProcessor
Registers a transaction processor used for device connections.- Parameters:
listener- The listener for new connections.- Returns:
- The host name and port for the browser, null for already registered or cannot start web socket.
unregisterTransactionProcessor
Unregisters a transaction processor used for device connections.getPanelEditors
Gets the list of available panel editors.dispose
public void dispose()Dispose of the server.