|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
uk.org.iscream.cms.server.clientinterface.TCPDataHandler
Acts as a Data Handler to a TCP based client, providing it with a constant stream of XML data for the hosts the client has requested.
Field Summary | |
private Logger |
_logger
This holds a reference to the system logger that is being used. |
private String |
_name
This is the friendly identifier of the component this class is running in. |
private Queue |
_queue
A reference to our Queue |
private int |
_queueID
Our queue number within our Queue |
private Socket |
_socket
A reference to the Socket connected to the client |
private BufferedReader |
_socketIn
A hook to the inbound data from the socket |
private PrintWriter |
_socketOut
A hook to the outbound stream for the socket |
String |
REVISION
The current CVS revision of this class |
private boolean |
run
The flag that dictates whether we should be running |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
TCPDataHandler(Socket socket)
Construct a new TCPDataHandler with a Socket provided by the Control Handler. |
Method Summary | |
Queue |
getQueue()
Accessor to our Queue. |
void |
run()
Main loop for the Data Handler, keeps sending data from it's local Queue. |
void |
shutdown()
Method to shutdown this Data Handler. |
String |
toString()
Overrides the Object.toString()
method to provide clean logging (every class should have this). |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final String REVISION
private String _name
private Logger _logger
private BufferedReader _socketIn
private PrintWriter _socketOut
private Socket _socket
private Queue _queue
private boolean run
private int _queueID
Constructor Detail |
public TCPDataHandler(Socket socket) throws IOException
socket
- The socket to which the Client has connected
IOException
- if something goes wrong, the Control Handler can deal with itMethod Detail |
public void run()
public void shutdown()
public String toString()
Object.toString()
method to provide clean logging (every class should have this).
This uses the uk.org.iscream.cms.util.NameFormat class
to format the toString()
public Queue getQueue()
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |