Package com.thecoderscorner.menu.remote
Interface RemoteConnector
- All Known Implementing Classes:
SocketBasedConnector,StreamRemoteConnector
public interface RemoteConnector
This is the base interface implemented by all remote connectors, it provides the means to both send and receive
menu commands. Most people just wanting to use a menu remotely won't need to understand the connector layer beyond
creating a connector.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Force close a connection when its known to be bad, the connector will try and establish a new connection.Gets the name of this connector locallybooleanIndicates if the underlying device is actually connected.voidRegister for information about connection statevoidregisterConnectorListener(RemoteConnectorListener listener)register a listener that will receive any messages sent by the menu libraryvoidsendMenuCommand(MenuCommand msg)Sends a command to the menu library running on the embedded hardware.voidstart()Starts the communication channel, so it will attempt to connect with the configured devicevoidstop()Stops the library and attempts to also stop any threads and other resources associated.
-
Method Details
-
start
void start()Starts the communication channel, so it will attempt to connect with the configured device -
stop
void stop()Stops the library and attempts to also stop any threads and other resources associated. -
getConnectionName
String getConnectionName()Gets the name of this connector locally -
close
void close()Force close a connection when its known to be bad, the connector will try and establish a new connection. -
isDeviceConnected
boolean isDeviceConnected()Indicates if the underlying device is actually connected.- Returns:
- true if the underlying device is connected
-
getRemoteParty
RemoteInformation getRemoteParty()- Returns:
- the remote party information of the current connection
-
getAuthenticationStatus
AuthStatus getAuthenticationStatus()- Returns:
- the status of the connection and authentication.
-