|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vigia.server.communications.ClientCommunicator
public class ClientCommunicator
An implementation of the server communication interface.
Field Summary | |
---|---|
protected ControlCommunicator |
controlCommunicator
The data communicator. |
protected DataCommunicator |
dataCommunicator
The control communicator. |
Constructor Summary | |
---|---|
ClientCommunicator(int controlPort)
Creates a communicator to listen a client. |
Method Summary | |
---|---|
void |
addCommandListener(CommandListener commandListener)
Adds a listener to obtain control messages from the remote camera. |
void |
sendFrame(java.awt.image.BufferedImage image)
Sends a frame to the client. |
void |
sendLog(ELog log,
java.lang.String message)
Sends an error to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ControlCommunicator controlCommunicator
protected DataCommunicator dataCommunicator
Constructor Detail |
---|
public ClientCommunicator(int controlPort) throws java.io.IOException
controlPort
- The control port.
java.io.IOException
- Error creating the socket.Method Detail |
---|
public void addCommandListener(CommandListener commandListener)
Communicator
addCommandListener
in interface Communicator
commandListener
- an implementation of the control listener.Communicator.addCommandListener(org.vigia.server.communications.CommandListener)
public void sendLog(ELog log, java.lang.String message) throws NotConnectedException, java.io.IOException
Communicator
sendLog
in interface Communicator
log
- the kind of error.message
- an error's description.
NotConnectedException
- There isn't any client connected.
java.io.IOException
- Error sending the message.Communicator.sendLog(org.vigia.shared.communications.ELog, java.lang.String)
public void sendFrame(java.awt.image.BufferedImage image) throws java.io.IOException
Communicator
sendFrame
in interface Communicator
image
- the frame.
java.io.IOException
- Error sending the frame.Communicator.sendFrame(java.awt.image.BufferedImage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |