|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vigia.server.communications.ControlCommunicator
public class ControlCommunicator
Implements the server control communication.
Nested Class Summary | |
---|---|
protected class |
ControlCommunicator.ControlCommunicatorReader
This class accepts clients, reads from the socket and sends the commands to the listeners. |
Field Summary | |
---|---|
protected java.net.Socket |
client
The socket to communicate with the clients. |
protected java.util.Set<CommandListener> |
commandListeners
The registered listeners. |
protected java.net.ServerSocket |
server
The socket to wait clients. |
Constructor Summary | |
---|---|
ControlCommunicator(int controlPort)
Creates a new ControlCommunicator. |
Method Summary | |
---|---|
void |
addCommandListener(CommandListener commandListener)
Adds a listener to obtain control messages from the remote camera. |
void |
sendLog(ELog log,
java.lang.String message)
Sends a log message to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.net.ServerSocket server
protected java.net.Socket client
protected java.util.Set<CommandListener> commandListeners
Constructor Detail |
---|
public ControlCommunicator(int controlPort) throws java.io.IOException
controlPort
- The control port.
java.io.IOException
- Error creating the socket.Method Detail |
---|
public void addCommandListener(CommandListener commandListener)
commandListener
- an implementation of the control listener.public void sendLog(ELog log, java.lang.String message) throws NotConnectedException, java.io.IOException
log
- the kind of log event.message
- the log message.
NotConnectedException
- There isn't any client.
java.io.IOException
- Error writing to the socket.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |