Interface RemoteConnector

All Known Implementing Classes:
Rs232RemoteConnector, 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 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.
    • sendMenuCommand

      void sendMenuCommand(MenuCommand msg) throws IOException
      Sends a command to the menu library running on the embedded hardware. If not connected the action is connector dependent.
      Parameters:
      msg - the message to send.
      Throws:
      IOException
    • getConnectionName

      String getConnectionName()
      Gets the name of this connector locally
    • registerConnectorListener

      void registerConnectorListener(RemoteConnectorListener listener)
      register a listener that will receive any messages sent by the menu library
      Parameters:
      listener - the listener
    • registerConnectionChangeListener

      void registerConnectionChangeListener(ConnectionChangeListener listener)
      Register for information about connection state
      Parameters:
      listener - the listener
    • 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.