|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vigia.client.communications.ControlCommunicator
public class ControlCommunicator
Implements the client control communication.
| Nested Class Summary | |
|---|---|
protected class |
ControlCommunicator.ControlCommunicatorReader
This class reads from the socket and sends the commands to the listeners. |
| Field Summary | |
|---|---|
protected java.util.Set<LogListener> |
logListeners
The registered listeners. |
protected java.net.Socket |
socket
The socket to connect with the server. |
| Constructor Summary | |
|---|---|
ControlCommunicator(java.lang.String host,
int controlPort)
Connects to the remote camera data port. |
|
| Method Summary | |
|---|---|
void |
addLogListener(LogListener logListener)
Adds a listener to obtain control messages from the remote camera. |
void |
close()
Closes the control communicator. |
void |
init(int dataPort)
Initializes the remote camera properly and starts the video transmission. |
boolean |
isClosed()
Check if the communications are closed. |
void |
move(int pan,
int tilt,
int zoom)
Send to the remote camera a move command in an absolute way. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.net.Socket socket
protected java.util.Set<LogListener> logListeners
| Constructor Detail |
|---|
public ControlCommunicator(java.lang.String host,
int controlPort)
throws java.net.UnknownHostException,
java.io.IOException
host - The remote host.controlPort - The remote port.
java.io.IOException - Error with the IO.
java.net.UnknownHostException - Host not found.| Method Detail |
|---|
public void addLogListener(LogListener logListener)
logListener - an implementation of the control listener.
public void init(int dataPort)
throws java.io.IOException
dataPort - the client data port.
java.io.IOException - Error sending the command.
public void move(int pan,
int tilt,
int zoom)
throws java.io.IOException
pan - pan position.tilt - tilt position.zoom - zoom position.
java.io.IOException - Error sending the command.
public void close()
throws java.io.IOException
java.io.IOException - Error closing the socket.public boolean isClosed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||