org.huihoo.jfox.pool.thread
Class SimpleThreadPool

java.lang.Object
  extended byorg.huihoo.jfox.system.ComponentSupport
      extended byorg.huihoo.jfox.pool.thread.SimpleThreadPool
All Implemented Interfaces:
Component, Loggable, Persistentable, java.io.Serializable, ThreadPool

public class SimpleThreadPool
extends ComponentSupport
implements ThreadPool

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.huihoo.jfox.system.ComponentSupport
logger, name, proxyInstance, sequence, state
 
Constructor Summary
SimpleThreadPool()
           
 
Method Summary
 void clear()
           
protected  void doDestroy()
          do actually destory action
protected  void doInit()
          do actually create action
 void execute(Threadable task)
          run a Threadable object
 java.lang.String getObjectClass()
           
 ObjectFactory getObjectFactory()
           
 int getRest()
           
 int getWorking()
           
 boolean removeObject(PoolableObject obj)
           
 boolean restoreObject(PoolableObject obj)
           
 PoolableObject retrieveObject()
           
 
Methods inherited from class org.huihoo.jfox.system.ComponentSupport
destroy, getLogger, getName, getState, init, parseName, setLogger, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleThreadPool

public SimpleThreadPool()
Method Detail

execute

public void execute(Threadable task)
Description copied from interface: ThreadPool
run a Threadable object

Specified by:
execute in interface ThreadPool
Parameters:
task -

doInit

protected void doInit()
               throws java.lang.Exception
Description copied from class: ComponentSupport
do actually create action

Specified by:
doInit in class ComponentSupport
Throws:
java.lang.Exception

doDestroy

protected void doDestroy()
                  throws java.lang.Exception
Description copied from class: ComponentSupport
do actually destory action

Specified by:
doDestroy in class ComponentSupport
Throws:
java.lang.Exception

clear

public void clear()

getObjectFactory

public ObjectFactory getObjectFactory()

getObjectClass

public java.lang.String getObjectClass()

getWorking

public int getWorking()

getRest

public int getRest()

retrieveObject

public PoolableObject retrieveObject()
                              throws java.lang.Exception
Throws:
java.lang.Exception

restoreObject

public boolean restoreObject(PoolableObject obj)

removeObject

public boolean removeObject(PoolableObject obj)