public class RemoteCommandServer
extends java.lang.Object
implements java.lang.Runnable, ej.rcommand.connectivity.ConnectivityManager
Constructor and Description |
---|
RemoteCommandServer(ej.rcommand.RemoteCommandManager commandManager,
int port,
int nbMaxConnection)
Creates a server which listen to the given port and accepts at maximum
the given number of connections.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectivityListener(ej.rcommand.connectivity.ConnectivityListener listener) |
int |
getAvailable() |
java.lang.String |
getConnectionInfo() |
void |
removeConnectivityListener(ej.rcommand.connectivity.ConnectivityListener listener) |
void |
run() |
void |
stopRunning() |
public RemoteCommandServer(ej.rcommand.RemoteCommandManager commandManager, int port, int nbMaxConnection)
commandManager
- the command manager.port
- the port where the server listen.nbMaxConnection
- the maximum number of simultaneous connection.public void run()
run
in interface java.lang.Runnable
public void stopRunning() throws java.io.IOException
java.io.IOException
public int getAvailable()
getAvailable
in interface ej.rcommand.connectivity.ConnectivityManager
public java.lang.String getConnectionInfo()
getConnectionInfo
in interface ej.rcommand.connectivity.ConnectivityManager
public void addConnectivityListener(ej.rcommand.connectivity.ConnectivityListener listener)
addConnectivityListener
in interface ej.rcommand.connectivity.ConnectivityManager
public void removeConnectivityListener(ej.rcommand.connectivity.ConnectivityListener listener)
removeConnectivityListener
in interface ej.rcommand.connectivity.ConnectivityManager