org.apache.geronimo.connector.work
Class GeronimoWorkManager
java.lang.Object
org.apache.geronimo.connector.work.GeronimoWorkManager
- All Implemented Interfaces:
- javax.resource.spi.work.WorkManager
public class GeronimoWorkManager
- extends java.lang.Object
- implements javax.resource.spi.work.WorkManager
WorkManager implementation which uses under the cover three WorkExecutorPool
- one for each synchronization policy - in order to dispatch the submitted
Work instances.
A WorkManager is a component of the JCA specifications, which allows a
Resource Adapter to submit tasks to an Application Server for execution.
- Version:
- $Rev: 925908 $ $Date: 2010-03-22 05:59:55 +0800 (Mon, 22 Mar 2010) $
| Fields inherited from interface javax.resource.spi.work.WorkManager |
IMMEDIATE, INDEFINITE, UNKNOWN |
|
Method Summary |
void |
doFail()
|
void |
doStart()
|
void |
doStop()
|
void |
doWork(javax.resource.spi.work.Work work)
|
void |
doWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener)
|
java.util.concurrent.Executor |
getScheduledWorkExecutorPool()
|
java.util.concurrent.Executor |
getStartWorkExecutorPool()
|
java.util.concurrent.Executor |
getSyncWorkExecutorPool()
|
boolean |
isContextSupported(java.lang.Class<? extends javax.resource.spi.work.WorkContext> aClass)
|
void |
scheduleWork(javax.resource.spi.work.Work work)
|
void |
scheduleWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener)
|
long |
startWork(javax.resource.spi.work.Work work)
|
long |
startWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeronimoWorkManager
public GeronimoWorkManager()
- Create a WorkManager.
GeronimoWorkManager
public GeronimoWorkManager(java.util.concurrent.Executor sync,
java.util.concurrent.Executor start,
java.util.concurrent.Executor sched,
java.util.Collection<WorkContextHandler> workContextHandlers)
doStart
public void doStart()
throws java.lang.Exception
- Throws:
java.lang.Exception
doStop
public void doStop()
throws java.lang.Exception
- Throws:
java.lang.Exception
doFail
public void doFail()
getSyncWorkExecutorPool
public java.util.concurrent.Executor getSyncWorkExecutorPool()
getStartWorkExecutorPool
public java.util.concurrent.Executor getStartWorkExecutorPool()
getScheduledWorkExecutorPool
public java.util.concurrent.Executor getScheduledWorkExecutorPool()
doWork
public void doWork(javax.resource.spi.work.Work work)
throws javax.resource.spi.work.WorkException
- Specified by:
doWork in interface javax.resource.spi.work.WorkManager
- Throws:
javax.resource.spi.work.WorkException
doWork
public void doWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener)
throws javax.resource.spi.work.WorkException
- Specified by:
doWork in interface javax.resource.spi.work.WorkManager
- Throws:
javax.resource.spi.work.WorkException
startWork
public long startWork(javax.resource.spi.work.Work work)
throws javax.resource.spi.work.WorkException
- Specified by:
startWork in interface javax.resource.spi.work.WorkManager
- Throws:
javax.resource.spi.work.WorkException
startWork
public long startWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener)
throws javax.resource.spi.work.WorkException
- Specified by:
startWork in interface javax.resource.spi.work.WorkManager
- Throws:
javax.resource.spi.work.WorkException
scheduleWork
public void scheduleWork(javax.resource.spi.work.Work work)
throws javax.resource.spi.work.WorkException
- Specified by:
scheduleWork in interface javax.resource.spi.work.WorkManager
- Throws:
javax.resource.spi.work.WorkException
scheduleWork
public void scheduleWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener)
throws javax.resource.spi.work.WorkException
- Specified by:
scheduleWork in interface javax.resource.spi.work.WorkManager
- Throws:
javax.resource.spi.work.WorkException
isContextSupported
public boolean isContextSupported(java.lang.Class<? extends javax.resource.spi.work.WorkContext> aClass)
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.