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.Runnablepublic void stopRunning()
throws java.io.IOException
java.io.IOExceptionpublic int getAvailable()
getAvailable in interface ej.rcommand.connectivity.ConnectivityManagerpublic java.lang.String getConnectionInfo()
getConnectionInfo in interface ej.rcommand.connectivity.ConnectivityManagerpublic void addConnectivityListener(ej.rcommand.connectivity.ConnectivityListener listener)
addConnectivityListener in interface ej.rcommand.connectivity.ConnectivityManagerpublic void removeConnectivityListener(ej.rcommand.connectivity.ConnectivityListener listener)
removeConnectivityListener in interface ej.rcommand.connectivity.ConnectivityManager