QuickServer
v1.4.1

org.quickserver.util.pool.thread
Class ClientPool

java.lang.Object
  |
  +--org.quickserver.util.pool.thread.ClientPool

public class ClientPool
extends java.lang.Object

This is a class for managing the pool of threads for handling clients.

Since:
1.3
Author:
Akshathkumar Shety

Field Summary
 ThreadObjectFactory factory
           
 
Constructor Summary
ClientPool(ObjectPoolConfig opConfig)
           
 
Method Summary
 void addClient(java.lang.Runnable r)
           
 void clear()
           
 void close()
           
protected  void finalize()
           
 java.util.Iterator getAllClientThread()
          Returns iterator containing all the active threads i.e ClientHandler handling connected clients.
 java.lang.Runnable getClient()
           
 int getNumActive()
          Return the number of instances currently borrowed from my pool.
 int getNumIdle()
          Return the number of instances currently idle in my pool.
 boolean isClientAvailable()
           
 void returnObject(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public ThreadObjectFactory factory
Constructor Detail

ClientPool

public ClientPool(ObjectPoolConfig opConfig)
Method Detail

addClient

public void addClient(java.lang.Runnable r)

returnObject

public void returnObject(java.lang.Object object)

getClient

public java.lang.Runnable getClient()

isClientAvailable

public boolean isClientAvailable()
Since:
1.4.5

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
java.lang.Throwable

close

public void close()
           throws java.lang.Exception
java.lang.Exception

clear

public void clear()
           throws java.lang.Exception
java.lang.Exception

getNumActive

public int getNumActive()
Return the number of instances currently borrowed from my pool.

Since:
1.4.1

getNumIdle

public int getNumIdle()
Return the number of instances currently idle in my pool.

Since:
1.4.1

getAllClientThread

public final java.util.Iterator getAllClientThread()
Returns iterator containing all the active threads i.e ClientHandler handling connected clients.

Since:
1.3.1

QuickServer
v1.4.1

Copyright © 2003-2004 QuickServer.org