org.apache.cxf.jca.cxf
Class WorkManagerThreadPool

java.lang.Object
  extended by org.apache.cxf.jca.cxf.CXFWorkAdapter
      extended by org.apache.cxf.jca.cxf.WorkManagerThreadPool
All Implemented Interfaces:
EventListener, javax.resource.spi.work.WorkListener, org.eclipse.jetty.util.thread.ThreadPool

public class WorkManagerThreadPool
extends CXFWorkAdapter
implements org.eclipse.jetty.util.thread.ThreadPool

The adapter for using Application Server's thread pool. Just simply override the dispatch method.


Nested Class Summary
 class WorkManagerThreadPool.WorkImpl
           
 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.ThreadPool
org.eclipse.jetty.util.thread.ThreadPool.SizedThreadPool
 
Field Summary
 
Fields inherited from class org.apache.cxf.jca.cxf.CXFWorkAdapter
DEFAULT_START_TIME_OUT
 
Constructor Summary
WorkManagerThreadPool(javax.resource.spi.work.WorkManager wm)
           
 
Method Summary
 boolean dispatch(Runnable job)
           
 int getIdleThreads()
           
 int getThreads()
           
 boolean isLowOnThreads()
           
 void join()
           
 void workRejected(javax.resource.spi.work.WorkEvent e)
           
 
Methods inherited from class org.apache.cxf.jca.cxf.CXFWorkAdapter
workAccepted, workCompleted, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkManagerThreadPool

public WorkManagerThreadPool(javax.resource.spi.work.WorkManager wm)
Method Detail

dispatch

public boolean dispatch(Runnable job)
Specified by:
dispatch in interface org.eclipse.jetty.util.thread.ThreadPool

getIdleThreads

public int getIdleThreads()
Specified by:
getIdleThreads in interface org.eclipse.jetty.util.thread.ThreadPool

getThreads

public int getThreads()
Specified by:
getThreads in interface org.eclipse.jetty.util.thread.ThreadPool

isLowOnThreads

public boolean isLowOnThreads()
Specified by:
isLowOnThreads in interface org.eclipse.jetty.util.thread.ThreadPool

join

public void join()
          throws InterruptedException
Specified by:
join in interface org.eclipse.jetty.util.thread.ThreadPool
Throws:
InterruptedException

workRejected

public void workRejected(javax.resource.spi.work.WorkEvent e)
Specified by:
workRejected in interface javax.resource.spi.work.WorkListener
Overrides:
workRejected in class CXFWorkAdapter


Apache CXF