its.element
Class OutputBuffer
java.lang.Object
its.element.OutputBuffer
- All Implemented Interfaces:
- java.lang.Runnable
- public class OutputBuffer
- extends java.lang.Object
- implements java.lang.Runnable
Manages a thread that reads frames from an OutputQueue object
and passes them to a downstream client. The new thread is created
and started in the constructor. The ConnectionDaemon creates an
OutputBuffer to maintain a connection to each client it accepts.
|
Method Summary |
void |
exit()
Shuts down the socket and exits the thread associated with this instance |
java.net.Socket |
getSocket()
|
java.util.Date |
getStartDate()
|
void |
run()
Main loop for OutputBuffer threads. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputBuffer
public OutputBuffer(OutputQueue dataQueue,
java.net.Socket clientSocket,
ConnectionDaemon cd)
throws java.io.IOException
run
public void run()
- Main loop for OutputBuffer threads. Any number of OutputBuffer
threads may be executing this code to read frames from a single
OutputQueue object and write them to a downstream client.
- Specified by:
run in interface java.lang.Runnable
getSocket
public java.net.Socket getSocket()
- Returns:
- the socket connected to our client
getStartDate
public java.util.Date getStartDate()
- Returns:
- the creation date of this instance of OutputBuffer
exit
public void exit()
- Shuts down the socket and exits the thread associated with this instance