QuickServer
v1.4.7

org.quickserver.util.pool.thread
Class ClientThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.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 Shetty

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
 void clean()
           
 int getInstanceId()
           
 java.lang.Runnable getThread()
          Returns the ClientHandler beeing run by the ClientThread.
 boolean isReady()
           
 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		
                N = Was notified, Looking for client
                D = Dead
                

Constructor Detail

ClientThread

public ClientThread(ClientPool pool)

ClientThread

public ClientThread(ClientPool pool,
                    int instanceCount)
Method Detail

isReady

public boolean isReady()

clean

public void clean()

getInstanceId

public int getInstanceId()

run

public void run()

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:...}

Since:
1.4.1

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org