RemoteConnectorpublic class Rs232RemoteConnector extends Object implements RemoteConnector
| Constructor | Description |
|---|---|
Rs232RemoteConnector(String portName,
int baud,
MenuCommandProtocol protocol,
ScheduledExecutorService executor) |
| 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 (for example rs232-comport)
|
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 Rs232RemoteConnector(String portName, int baud, MenuCommandProtocol protocol, ScheduledExecutorService executor)
public void start()
RemoteConnectorstart in interface RemoteConnectorpublic void stop()
RemoteConnectorstop in interface RemoteConnectorpublic void sendMenuCommand(MenuCommand msg) throws IOException
RemoteConnectorsendMenuCommand in interface RemoteConnectormsg - the message to send.IOExceptionpublic 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.