public class RemoteCommandCommPopulator extends Object implements ConnectivityManager
Constructor and Description |
---|
RemoteCommandCommPopulator(String connectionString) |
Modifier and Type | Method and Description |
---|---|
void |
addConnectivityListener(ConnectivityListener listener)
Adds a listener.
|
int |
getAvailable()
Returns the numbers of available connections.
|
String |
getConnectionInfo()
Returns a String representing how the service can be joined from remote
clients.
|
void |
removeConnectivityListener(ConnectivityListener listener)
Removes a listener.
|
void |
start(RemoteCommandManager commandManager)
Creates the comm connection and adds it in the given remote command
manager.
|
void |
stop()
Stops the reading of the comm connection and closes it.
|
public RemoteCommandCommPopulator(String connectionString)
connectionString
- the connection string of the comm connection to create.public void addConnectivityListener(ConnectivityListener listener)
ConnectivityManager
addConnectivityListener
in interface ConnectivityManager
listener
- the listener.public int getAvailable()
ConnectivityManager
getAvailable
in interface ConnectivityManager
public String getConnectionInfo()
ConnectivityManager
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
getConnectionInfo
in interface ConnectivityManager
public void removeConnectivityListener(ConnectivityListener listener)
ConnectivityManager
removeConnectivityListener
in interface ConnectivityManager
listener
- the listener.public void start(RemoteCommandManager commandManager) throws IOException
commandManager
- the command manager to use to manage the created comm
connection.IOException
- if a I/O error occurs.public void stop()