its.element
Class InputBuffer

java.lang.Object
  extended byits.element.InputBuffer
All Implemented Interfaces:
java.lang.Runnable

public class InputBuffer
extends java.lang.Object
implements java.lang.Runnable

Manages a thread that reads frames from a ClientConnection object and adds them to a FrameQueue. The new thread is created and started in the constructor.


Constructor Summary
InputBuffer(java.net.InetAddress address, int port, FrameTarget outputQueue)
           
InputBuffer(java.net.InetAddress address, int port, FrameTarget outputQueue, java.lang.ThreadGroup tg)
          creates a new thread to execute this object's run method
 
Method Summary
 void exit()
          The creator of this object should call this method to tell it to end its thread of execution.
 ClientConnection getConnection()
          Provides access to the internal ClientConnection object
 void run()
          Main loop for the InputBuffer thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputBuffer

public InputBuffer(java.net.InetAddress address,
                   int port,
                   FrameTarget outputQueue,
                   java.lang.ThreadGroup tg)
            throws java.io.IOException
creates a new thread to execute this object's run method

Parameters:
address - the host's internet address
port - the port number
outputQueue - destination for incoming frames
Throws:
java.io.IOException - if a connection to the given server is impossible

InputBuffer

public InputBuffer(java.net.InetAddress address,
                   int port,
                   FrameTarget outputQueue)
            throws java.io.IOException
Method Detail

run

public void run()
Main loop for the InputBuffer thread. Reads frames from a ClientConnection and places them in the FrameQueue.

Specified by:
run in interface java.lang.Runnable

exit

public void exit()
The creator of this object should call this method to tell it to end its thread of execution.


getConnection

public ClientConnection getConnection()
Provides access to the internal ClientConnection object