public class MuleWorkManager extends Object implements WorkManager, MuleContextAware
MuleWorkManager is a JCA Work manager implementation used to manage
thread allocation for Mule components and connectors. This code has been adapted
from the Geronimo implementation.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger
logger used by this class
|
PHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
MuleWorkManager(ThreadingProfile profile,
String name,
int shutdownTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
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) |
void |
execute(Runnable work) |
MuleContext |
getMuleContext() |
protected ThreadingProfile |
getThreadingProfile() |
javax.resource.spi.XATerminator |
getXATerminator() |
boolean |
isStarted()
Is the WorkManager ready to accept work?
|
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 |
setMuleContext(MuleContext muleContext) |
void |
start() |
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) |
protected static final org.apache.commons.logging.Log logger
public MuleWorkManager(ThreadingProfile profile, String name, int shutdownTimeout)
public void start()
throws MuleException
start in interface StartableMuleExceptionpublic void dispose()
Disposabledispose in interface Disposablepublic javax.resource.spi.XATerminator getXATerminator()
public 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.WorkExceptionpublic void execute(Runnable work)
execute in interface ExecutorExecutor.execute(Runnable)public boolean isStarted()
WorkManagerpublic MuleContext getMuleContext()
public void setMuleContext(MuleContext muleContext)
setMuleContext in interface MuleContextAwareprotected ThreadingProfile getThreadingProfile()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.