Class RemoteCommandServer

    • Constructor Detail

      • RemoteCommandServer

        public RemoteCommandServer​(RemoteCommandManager commandManager,
                                   int port,
                                   int nbMaxConnection)
        Creates a server which listen to the given port and accepts at maximum the given number of connections.
        Parameters:
        commandManager - the command manager.
        port - the port where the server listen.
        nbMaxConnection - the maximum number of simultaneous connection.
    • Method Detail

      • run

        public void run()
        Description copied from interface: Runnable
        When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

        The general contract of the method run is that it may take any action whatsoever.

        Specified by:
        run in interface Runnable
        See Also:
        Thread.run()
      • getAvailable

        public int getAvailable()
        Description copied from interface: ConnectivityManager
        Returns the numbers of available connections.
        Specified by:
        getAvailable in interface ConnectivityManager
        Returns:
        the numbers of available connections.
      • getConnectionInfo

        public String getConnectionInfo()
        Description copied from interface: ConnectivityManager
        Returns a String representing how the service can be joined from remote clients.

        Examples of such strings are:

        • 192.168.0.1:4000 for a service listening on a TCP port on these addresses and ports.
        • for a service listening on a TCP port on these addresses and ports.
        • comm:com6;baudrate=115200 for a service listening on a COMM port with these parameters
        Specified by:
        getConnectionInfo in interface ConnectivityManager
        Returns:
        the connectivity URL, as a String.