audio
Class VideoServerCommunicator

java.lang.Object
  extended by java.lang.Thread
      extended by audio.VideoServerCommunicator
All Implemented Interfaces:
java.lang.Runnable, ControlMessageReceiver

public class VideoServerCommunicator
extends java.lang.Thread
implements ControlMessageReceiver

Runs in the background and sends/receives messages from a remote VideoProcessor.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
VideoServerCommunicator(byte[] remoteHostAddress, int remotePort, int localPort, VideoServer parent, Logger logger)
           
 
Method Summary
 void halt()
          Stops the run() method from running.
 void receiveControlMessage(ControlMessage controlMessage)
          The object should decode and act on the passed message
 void run()
           
 boolean running()
           
 void sendVideoInterfaceModule(VideoOutputModule videoInterfaceModule)
          Packs up the passed module into a ControlMessage and sends it to the remove VideoProcessor.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VideoServerCommunicator

public VideoServerCommunicator(byte[] remoteHostAddress,
                               int remotePort,
                               int localPort,
                               VideoServer parent,
                               Logger logger)
                        throws java.io.IOException
Parameters:
remoteHostAddress -
remotePort -
localPort -
parent -
logger -
Throws:
java.io.IOException
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

receiveControlMessage

public void receiveControlMessage(ControlMessage controlMessage)
Description copied from interface: ControlMessageReceiver
The object should decode and act on the passed message

Specified by:
receiveControlMessage in interface ControlMessageReceiver

halt

public void halt()
Stops the run() method from running.


running

public boolean running()
Returns:
True if we are running, false otherwise.

sendVideoInterfaceModule

public void sendVideoInterfaceModule(VideoOutputModule videoInterfaceModule)
Packs up the passed module into a ControlMessage and sends it to the remove VideoProcessor.

Parameters:
videoInterfaceModule -