
public class WorkManagerImpl
extends java.lang.Object
implements org.jboss.jca.core.api.workmanager.WorkManager
| Constructor and Description |
|---|
WorkManagerImpl()
Constructor - by default the WorkManager is running in spec-compliant mode
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelShutdown()
Cancel shutdown
|
org.jboss.jca.core.api.workmanager.WorkManager |
clone()
Clone the WorkManager implementation
|
protected WorkWrapper |
createWorkWrapper(org.jboss.jca.core.spi.security.SecurityIntegration securityIntegration,
javax.resource.spi.work.Work work,
javax.resource.spi.work.ExecutionContext executionContext,
javax.resource.spi.work.WorkListener workListener,
java.util.concurrent.CountDownLatch startedLatch,
java.util.concurrent.CountDownLatch completedLatch)
Crestes a wrapper for work
|
protected void |
deltaDoWorkAccepted()
Delta doWork accepted
|
protected void |
deltaDoWorkRejected()
Delta doWork rejected
|
protected void |
deltaScheduleWorkAccepted()
Delta scheduleWork accepted
|
protected void |
deltaScheduleWorkRejected()
Delta scheduleWork rejected
|
protected void |
deltaStartWorkAccepted()
Delta startWork accepted
|
protected void |
deltaStartWorkRejected()
Delta startWork rejected
|
protected void |
deltaWorkFailed()
Delta work failed
|
protected void |
deltaWorkSuccessful()
Delta work successful
|
void |
doFirstChecks(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext)
Do first checks for work starting methods
|
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) |
org.jboss.jca.core.spi.security.Callback |
getCallbackSecurity()
Get the callback security module
|
int |
getDelay()
Get the delay until shutdown occurs
|
java.lang.String |
getId()
Get the unique id of the work manager
|
org.jboss.jca.core.api.workmanager.StatisticsExecutor |
getLongRunningThreadPool()
Retrieve the executor for long running tasks
|
java.lang.String |
getName()
Get the name of the work manager
|
javax.resource.spi.ResourceAdapter |
getResourceAdapter()
Get the resource adapter
|
org.jboss.jca.core.spi.security.SecurityIntegration |
getSecurityIntegration()
Get the security integration module
|
org.jboss.jca.core.api.workmanager.StatisticsExecutor |
getShortRunningThreadPool()
Retrieve the executor for short running tasks
|
org.jboss.jca.core.api.workmanager.WorkManagerStatistics |
getStatistics()
Get the statistics
|
org.jboss.jca.core.spi.transaction.xa.XATerminator |
getXATerminator()
Get the XATerminator
|
boolean |
isShutdown()
Is the component shutdown
|
boolean |
isSpecCompliant()
Is spec compliant
|
boolean |
isStatisticsEnabled()
Is statistics enabled
|
void |
prepareShutdown()
Signal the component to prepare for shutdown
|
void |
prepareShutdown(org.jboss.jca.core.spi.graceful.GracefulCallback cb)
Signal the component to prepare for shutdown
|
void |
prepareShutdown(int seconds)
Signal the component to prepare for shutdown
|
void |
prepareShutdown(int seconds,
org.jboss.jca.core.spi.graceful.GracefulCallback cb)
Signal the component to prepare for shutdown
|
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) |
void |
setCallbackSecurity(org.jboss.jca.core.spi.security.Callback v)
Set callback security module
|
void |
setId(java.lang.String v)
Set the unique id of the work manager
|
void |
setLongRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
Set the executor for long running tasks
|
void |
setName(java.lang.String v)
Set the name of the work manager
|
void |
setResourceAdapter(javax.resource.spi.ResourceAdapter v)
Set the resource adapter
|
void |
setSecurityIntegration(org.jboss.jca.core.spi.security.SecurityIntegration v)
Set security intergation module
|
void |
setShortRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
Set the executor for short running tasks
|
void |
setSpecCompliant(boolean v)
Set spec compliant flag
|
void |
setStatisticsEnabled(boolean v)
Set the statistics enabled flag
|
void |
setXATerminator(org.jboss.jca.core.spi.transaction.xa.XATerminator xaTerminator)
Set the XATerminator
|
void |
shutdown()
Shutdown the component
|
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) |
java.lang.String |
toString()
String representation
|
void |
toString(java.lang.StringBuilder sb)
Additional string representation
|
public WorkManagerImpl()
public java.lang.String getId()
public void setId(java.lang.String v)
v - The valuepublic java.lang.String getName()
public void setName(java.lang.String v)
v - The valuepublic org.jboss.jca.core.api.workmanager.StatisticsExecutor getShortRunningThreadPool()
public void setShortRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
executor - The executorpublic org.jboss.jca.core.api.workmanager.StatisticsExecutor getLongRunningThreadPool()
public void setLongRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
executor - The executorpublic org.jboss.jca.core.spi.transaction.xa.XATerminator getXATerminator()
public void setXATerminator(org.jboss.jca.core.spi.transaction.xa.XATerminator xaTerminator)
xaTerminator - The XA terminatorpublic boolean isSpecCompliant()
public void setSpecCompliant(boolean v)
v - The valuepublic org.jboss.jca.core.spi.security.Callback getCallbackSecurity()
public void setCallbackSecurity(org.jboss.jca.core.spi.security.Callback v)
v - The valuepublic org.jboss.jca.core.spi.security.SecurityIntegration getSecurityIntegration()
public void setSecurityIntegration(org.jboss.jca.core.spi.security.SecurityIntegration v)
v - The valuepublic javax.resource.spi.ResourceAdapter getResourceAdapter()
public void setResourceAdapter(javax.resource.spi.ResourceAdapter v)
v - The valuepublic boolean isStatisticsEnabled()
public void setStatisticsEnabled(boolean v)
v - The valuepublic org.jboss.jca.core.api.workmanager.WorkManagerStatistics getStatistics()
public org.jboss.jca.core.api.workmanager.WorkManager clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - Thrown if the copy operation isn't supportedpublic void doWork(javax.resource.spi.work.Work work)
throws javax.resource.spi.work.WorkException
doWork in interface javax.resource.spi.work.WorkManagerjavax.resource.spi.work.WorkExceptionpublic 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
doWork in interface javax.resource.spi.work.WorkManagerjavax.resource.spi.work.WorkExceptionpublic long startWork(javax.resource.spi.work.Work work)
throws javax.resource.spi.work.WorkException
startWork in interface javax.resource.spi.work.WorkManagerjavax.resource.spi.work.WorkExceptionpublic 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
startWork in interface javax.resource.spi.work.WorkManagerjavax.resource.spi.work.WorkExceptionpublic void scheduleWork(javax.resource.spi.work.Work work)
throws javax.resource.spi.work.WorkException
scheduleWork in interface javax.resource.spi.work.WorkManagerjavax.resource.spi.work.WorkExceptionpublic 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
scheduleWork in interface javax.resource.spi.work.WorkManagerjavax.resource.spi.work.WorkExceptionprotected WorkWrapper createWorkWrapper(org.jboss.jca.core.spi.security.SecurityIntegration securityIntegration, javax.resource.spi.work.Work work, javax.resource.spi.work.ExecutionContext executionContext, javax.resource.spi.work.WorkListener workListener, java.util.concurrent.CountDownLatch startedLatch, java.util.concurrent.CountDownLatch completedLatch)
securityIntegration - the security integrationwork - the workexecutionContext - the execution contextworkListener - the work listenerstartedLatch - latch that will be notified when work starts execution. Can be null.completedLatch - latch that will be notified when work completes execution. Can be null.protected void deltaDoWorkAccepted()
protected void deltaDoWorkRejected()
protected void deltaStartWorkAccepted()
protected void deltaStartWorkRejected()
protected void deltaScheduleWorkAccepted()
protected void deltaScheduleWorkRejected()
protected void deltaWorkSuccessful()
protected void deltaWorkFailed()
public void doFirstChecks(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext)
throws javax.resource.spi.work.WorkException
work - to checkstartTimeout - to checkexecContext - to checkjavax.resource.spi.work.WorkException - in case of check don't passpublic boolean cancelShutdown()
cancelShutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdownpublic void prepareShutdown()
prepareShutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdownpublic void prepareShutdown(org.jboss.jca.core.spi.graceful.GracefulCallback cb)
prepareShutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdowncb - The callback handlepublic void prepareShutdown(int seconds)
prepareShutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdownseconds - The number of seconds after which shutdown is forcedpublic void prepareShutdown(int seconds,
org.jboss.jca.core.spi.graceful.GracefulCallback cb)
prepareShutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdownseconds - The number of seconds after which shutdown is forcedcb - The callback handlepublic void shutdown()
shutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdownpublic boolean isShutdown()
isShutdown in interface org.jboss.jca.core.spi.graceful.GracefulShutdownpublic int getDelay()
getDelay in interface org.jboss.jca.core.spi.graceful.GracefulShutdownInteger.MAX_VALUE for active,
or Integer.MIN_VALUE for inactivepublic java.lang.String toString()
toString in class java.lang.Objectpublic void toString(java.lang.StringBuilder sb)
sb - The string builderCopyright © 2014 IronJacamar (http://www.ironjacamar.org)