
public class WorkWrapper extends Object implements Runnable
| Constructor and Description |
|---|
WorkWrapper(WorkManagerImpl workManager,
javax.resource.spi.work.Work work,
javax.resource.spi.work.ExecutionContext executionContext,
javax.resource.spi.work.WorkListener workListener,
CountDownLatch startedLatch,
CountDownLatch completedLatch,
long startTime)
Create a new WorkWrapper
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWorkContext(Class<? extends javax.resource.spi.work.WorkContext> workContextClass,
javax.resource.spi.work.WorkContext workContext)
Adds new work context.
|
protected void |
cancel()
Cancel
|
protected void |
end()
End
|
javax.resource.spi.work.ExecutionContext |
getExecutionContext()
Retrieve the exection context
|
javax.resource.spi.work.Work |
getWork()
Retrieve the work
|
<T> T |
getWorkContext(Class<T> workContextClass)
Returns work context instance.
|
javax.resource.spi.work.WorkException |
getWorkException()
Get any exception
|
javax.resource.spi.work.WorkListener |
getWorkListener()
Retrieve the work listener
|
org.jboss.jca.core.api.workmanager.WorkManager |
getWorkManager()
Get the work manager
|
void |
run()
Run
|
protected void |
start()
Start
|
String |
toString()
String representation
|
public WorkWrapper(WorkManagerImpl workManager, javax.resource.spi.work.Work work, javax.resource.spi.work.ExecutionContext executionContext, javax.resource.spi.work.WorkListener workListener, CountDownLatch startedLatch, CountDownLatch completedLatch, long startTime)
workManager - the work managerwork - the workexecutionContext - the execution contextworkListener - the WorkListenerstartedLatch - The latch for when work has startedcompletedLatch - The latch for when work has completedstartTime - The start timeIllegalArgumentException - for null work, execution context or a negative start timeoutpublic org.jboss.jca.core.api.workmanager.WorkManager getWorkManager()
public javax.resource.spi.work.Work getWork()
public javax.resource.spi.work.ExecutionContext getExecutionContext()
public javax.resource.spi.work.WorkListener getWorkListener()
public javax.resource.spi.work.WorkException getWorkException()
protected void start()
throws javax.resource.spi.work.WorkException
javax.resource.spi.work.WorkException - for any errorprotected void end()
protected void cancel()
public <T> T getWorkContext(Class<T> workContextClass)
T - class type infoworkContextClass - work context typepublic void addWorkContext(Class<? extends javax.resource.spi.work.WorkContext> workContextClass, javax.resource.spi.work.WorkContext workContext)
workContext - new work contextworkContextClass - work context classCopyright © 2013 IronJacamar (http://www.ironjacamar.org)