RemoteConnectorpublic class UdpRemoteConnector extends Object implements RemoteConnector
| Constructor | Description |
|---|---|
UdpRemoteConnector(ScheduledExecutorService executor,
long flushFreq,
String address,
int port,
MenuCommandProtocol protocol,
short deviceId,
boolean sendAsDevice) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Force close a connection when its known to be bad, the connector will try and
establish a new connection.
|
String |
getConnectionName() |
Gets the name of this connector locally
|
boolean |
isConnected() |
Gets the underlying connection state for this connector.
|
void |
registerConnectionChangeListener(ConnectionChangeListener listener) |
Register for information about connection state
|
void |
registerConnectorListener(RemoteConnectorListener listener) |
register a listener that will receive any messages sent by the menu library
|
void |
sendMenuCommand(MenuCommand msg) |
Sends a command to the menu library running on the embedded hardware.
|
void |
start() |
Starts the communication channel, so it will attempt to connect with the configured device
|
void |
stop() |
Stops the library and attempts to also stop any threads and other resources associated.
|
public UdpRemoteConnector(ScheduledExecutorService executor, long flushFreq, String address, int port, MenuCommandProtocol protocol, short deviceId, boolean sendAsDevice) throws IOException
IOExceptionpublic void start()
RemoteConnectorstart in interface RemoteConnectorpublic void sendMenuCommand(MenuCommand msg) throws IOException
RemoteConnectorsendMenuCommand in interface RemoteConnectormsg - the message to send.IOExceptionpublic void stop()
RemoteConnectorstop in interface RemoteConnectorpublic boolean isConnected()
RemoteConnectorisConnected in interface RemoteConnectorpublic String getConnectionName()
RemoteConnectorgetConnectionName in interface RemoteConnectorpublic void registerConnectorListener(RemoteConnectorListener listener)
RemoteConnectorregisterConnectorListener in interface RemoteConnectorlistener - the listenerpublic void registerConnectionChangeListener(ConnectionChangeListener listener)
RemoteConnectorregisterConnectionChangeListener in interface RemoteConnectorlistener - the listenerpublic void close()
RemoteConnectorclose in interface RemoteConnectorCopyright © 2018. All rights reserved.