Package com.iizigo.comm
Class WebSocketServer
- java.lang.Object
- com.iizigo.comm.WebSocketServer
public class WebSocketServer extends java.lang.ObjectThe Web Socket Server of iiziGo inside Eclipse.- Author:
- Christopher Mindus
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose of the server.static WebSocketServergetInstance()Gets the instance of the Web Socket Server.static PanelEditorTransactionProcessor[]getPanelEditors()Gets the list of available panel editors.static WorkergetWorker(java.lang.Runnable startedCallback)Gets the worker instance.static booleanisStarted()Checks if the server is started.static java.lang.StringregisterTransactionProcessor(PanelEditorTransactionProcessor listener)Registers a transaction processor used for device connections.static voidunregisterTransactionProcessor(PanelEditorTransactionProcessor listener)Unregisters a transaction processor used for device connections.
Method Detail
getInstance
public static WebSocketServer getInstance() throws java.lang.Exception
Gets the instance of the Web Socket Server.- Throws:
java.lang.Exception- For start errors.
getWorker
public static Worker getWorker(java.lang.Runnable startedCallback) throws java.io.IOException
Gets the worker instance.- Parameters:
startedCallback- Callback for started, null for none.- Throws:
java.io.IOException
isStarted
public static boolean isStarted()
Checks if the server is started.
registerTransactionProcessor
public static java.lang.String registerTransactionProcessor(PanelEditorTransactionProcessor listener)
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
public static void unregisterTransactionProcessor(PanelEditorTransactionProcessor listener)
Unregisters a transaction processor used for device connections.
getPanelEditors
public static PanelEditorTransactionProcessor[] getPanelEditors()
Gets the list of available panel editors.
dispose
public void dispose()
Dispose of the server.