Class TCPIPWriteThread

Class TCPIPWriteThread

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----SleepingThread
                   |
                   +----TCPIPWriteThread

class TCPIPWriteThread
extends SleepingThread
A thread that reads Messages from a SimpleQueue and writes that data to a socket.

It blocks if the queue becomes empty and waits for some queue Messages to appear. Interesting only for hackers.

Written: Radu Sion
Version: 0.33
Source: TCPIPWriteThread.java
See Also:
Message, SimpleQueue, FullException, EmptyException, TCPIPReadThread, TCPIPThread, SleepingThread

Constructor Index

 o TCPIPWriteThread()
Fake constructor for class loading purposes.
 o TCPIPWriteThread(Socket, SimpleQueue, int, long)
Creates a new TCPIPWriteThread.

Method Index

 o finalize()
 o run()

Constructors

 o TCPIPWriteThread
  public TCPIPWriteThread()
Fake constructor for class loading purposes.
 o TCPIPWriteThread
  public TCPIPWriteThread(Socket sock,
                          SimpleQueue queue,
                          int max_messages,
                          long sleep)
Creates a new TCPIPWriteThread.
Parameters:
sock - The Socket to which to write
queue - The SimpleQueue from which to read
max_messages - The maximum number of Messages to read (if -1 then reading in loop)

Methods

 o run
  public void run()
Overrides:
run in class Thread
 o finalize
  protected void finalize()
Overrides:
finalize in class Object