Package ej.rcommand
Interface RemoteCommandManager
-
- All Superinterfaces:
CommandSenderProvider
- All Known Implementing Classes:
DefaultRemoteCommandManager,GatewayRemoteCommandManager
public interface RemoteCommandManager extends CommandSenderProvider
Manages the threads that will read the command from theRemoteConnection.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsendNotification(RemoteNotification notification)Sends the given notification to all connected clients.voidstartReading(RemoteConnection connection, String connectionName)Starts to read and execute the commands from the givenCommandReader.voidstartReading(RemoteConnection connection, String connectionName, RemoteConnectionListener listener)Starts to read and execute the commands from the givenCommandReader.voidstopAll()Stops all the connections.voidstopReading(RemoteConnection connection)Stops reading the commands from the givenCommandReader.-
Methods inherited from interface ej.rcommand.CommandSenderProvider
getCommandSenders, getRegisteredCommands, registerListener
-
-
-
-
Method Detail
-
startReading
void startReading(RemoteConnection connection, String connectionName)
Starts to read and execute the commands from the givenCommandReader.A new thread is created.
This method behaves exactly as if it simply performs the call
startReading(connection, "unknown").- Parameters:
connection- the connection to read.connectionName- the name of the connection to read.
-
startReading
void startReading(RemoteConnection connection, String connectionName, RemoteConnectionListener listener)
Starts to read and execute the commands from the givenCommandReader.A new thread is created.
- Parameters:
connection- the connection to read.listener- the associated listener.connectionName- the name of the connection to read.
-
stopReading
void stopReading(RemoteConnection connection)
Stops reading the commands from the givenCommandReader.- Parameters:
connection- the connection to stop to read.
-
stopAll
void stopAll()
Stops all the connections.
-
sendNotification
void sendNotification(RemoteNotification notification)
Sends the given notification to all connected clients.- Parameters:
notification- the notification to send.
-
-