public class SedaStageInterceptingMessageProcessor extends AsyncInterceptingMessageProcessor implements javax.resource.spi.work.Work, Lifecycle, Pausable, Resumable
MuleEvent's asynchronously using a MuleWorkManager to schedule asynchronous
processing of the next MessageProcessor.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_QUEUE_SIZE_MAX_THREADS_FACTOR |
protected SedaStageLifecycleManager |
lifecycleManager |
protected Queue |
queue |
protected static String |
QUEUE_NAME_PREFIX |
protected QueueConfiguration |
queueConfiguration |
protected String |
queueName |
protected QueueProfile |
queueProfile |
protected QueueStatistics |
queueStatistics |
protected int |
queueTimeout |
doThreading, SYNCHRONOUS_EVENT_ERROR_MESSAGE, threadTimeout, workManager, workManagerSourcelogger, muleContext, next, notificationHandlerPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
SedaStageInterceptingMessageProcessor(String threadName,
String queueName,
QueueProfile queueProfile,
int queueTimeout,
ThreadingProfile threadingProfile,
QueueStatistics queueStatistics,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureDefaultQueueSize(QueueProfile queueProfile,
ThreadingProfile threadingProfile) |
protected MuleEvent |
dequeue() |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected void |
enqueue(MuleEvent event) |
protected String |
getQueueName() |
int |
getQueueSize() |
protected String |
getStageDescription() |
protected String |
getStageName() |
void |
initialise()
Method used to perform any initialisation work.
|
protected boolean |
isQueuePersistent()
Are the events in the SEDA queue persistent?
|
protected boolean |
isStatsEnabled() |
void |
pause() |
protected void |
processNextAsync(MuleEvent event) |
void |
release() |
void |
resume() |
protected void |
rollbackDequeue(MuleEvent event)
Roll back the previous dequeue(), i.e., put the event at the front of the queue, not at the back which
is what enqueue() does.
|
void |
run()
While the service isn't stopped this runs a continuous loop checking for new events in the queue.
|
void |
start() |
void |
stop() |
protected void |
waitIfPaused() |
fireAsyncScheduledNotification, firePipelineNotification, isProcessAsync, process, processNextTimed, setMessagingExceptionHandleraddMessageProcessorPathElements, getListener, getMuleContext, isEventValid, processNext, setListener, setMuleContext, toStringgetAnnotation, getAnnotations, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetListenerprotected static final String QUEUE_NAME_PREFIX
public static int DEFAULT_QUEUE_SIZE_MAX_THREADS_FACTOR
protected QueueProfile queueProfile
protected int queueTimeout
protected QueueStatistics queueStatistics
protected String queueName
protected Queue queue
protected QueueConfiguration queueConfiguration
protected SedaStageLifecycleManager lifecycleManager
public SedaStageInterceptingMessageProcessor(String threadName, String queueName, QueueProfile queueProfile, int queueTimeout, ThreadingProfile threadingProfile, QueueStatistics queueStatistics, MuleContext muleContext)
protected void configureDefaultQueueSize(QueueProfile queueProfile, ThreadingProfile threadingProfile)
protected void processNextAsync(MuleEvent event) throws MuleException
processNextAsync in class AsyncInterceptingMessageProcessorMuleExceptionprotected boolean isStatsEnabled()
protected void rollbackDequeue(MuleEvent event)
public void run()
protected boolean isQueuePersistent()
public int getQueueSize()
protected String getQueueName()
protected String getStageName()
protected String getStageDescription()
protected void waitIfPaused()
throws InterruptedException
InterruptedExceptionpublic void release()
release in interface javax.resource.spi.work.Workpublic void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic void start()
throws MuleException
start in interface Startablestart in class AsyncInterceptingMessageProcessorMuleExceptionpublic void stop()
throws MuleException
stop in interface Stoppablestop in class AsyncInterceptingMessageProcessorMuleExceptionpublic void dispose()
Disposabledispose in interface Disposablepublic void pause()
throws MuleException
pause in interface PausableMuleExceptionpublic void resume()
throws MuleException
resume in interface ResumableMuleExceptionCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.