org.vigia.server.communications
Interface Communicator

All Known Implementing Classes:
ClientCommunicator

public interface Communicator

The common interface for all the server communication implementations.

Author:
jrios

Method Summary
 void addCommandListener(CommandListener controlListener)
          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 error, java.lang.String description)
          Sends an error to the client.
 

Method Detail

addCommandListener

void addCommandListener(CommandListener controlListener)
Adds a listener to obtain control messages from the remote camera.

Parameters:
controlListener - an implementation of the control listener.

sendLog

void sendLog(ELog error,
             java.lang.String description)
             throws NotConnectedException,
                    java.io.IOException
Sends an error to the client.

Parameters:
error - the kind of error.
description - an error's description.
Throws:
java.io.IOException - Error sending the message.
NotConnectedException - There isn't any client connected.

sendFrame

void sendFrame(java.awt.image.BufferedImage image)
               throws java.io.IOException
Sends a frame to the client.

Parameters:
image - the frame.
Throws:
java.io.IOException - Error sending the frame.