QuickServer
v1.4.1

org.quickserver.util.pool.thread
Class ClientThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.quickserver.util.pool.thread.ClientThread
All Implemented Interfaces:
java.lang.Runnable

public class ClientThread
extends java.lang.Thread

This is the worker thread used to handle clients using ClientHandler

Since:
1.3
Author:
Akshathkumar Shety

Field Summary
protected  char state
          Holds the current Thread state.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ClientThread(ClientPool pool)
           
ClientThread(ClientPool pool, int instanceCount)
           
 
Method Summary
 int getId()
           
 java.lang.Runnable getThread()
          Returns the ClientHandler beeing run by the ClientThread.
 void run()
           
 java.lang.String toString()
          [ThreadInPool[]:] - - Client {ClientHandler:...}
 
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

state

protected volatile char state
Holds the current Thread state.
                 U = Unknown
                 S = Started
                 R - Running a client
                 I = Idle
                 L = Looking for client
                 P = Was sent back to pool
                 W = Waiting in pool		
                 D = Dead
                 

Constructor Detail

ClientThread

public ClientThread(ClientPool pool)

ClientThread

public ClientThread(ClientPool pool,
                    int instanceCount)
Method Detail

getId

public int getId()

run

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

getThread

public java.lang.Runnable getThread()
Returns the ClientHandler beeing run by the ClientThread.

Since:
1.3.1

toString

public java.lang.String toString()
[ThreadInPool[]:] - - Client {ClientHandler:...}

Overrides:
toString in class java.lang.Thread
Since:
1.4.1

QuickServer
v1.4.1

Copyright © 2003-2004 QuickServer.org