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, workManagerSource
logger, muleContext, next, notificationHandler
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
PROPERTY_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, setMessagingExceptionHandler
addMessageProcessorPathElements, getListener, getMuleContext, isEventValid, processNext, setListener, setMuleContext, toString
getAnnotation, getAnnotations, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setListener
protected 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 AsyncInterceptingMessageProcessor
MuleException
protected 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
InterruptedException
public void release()
release
in interface javax.resource.spi.work.Work
public void initialise() throws InitialisationException
Initialisable
InitialisationException
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 Initialisable
InitialisationException
- 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 Startable
start
in class AsyncInterceptingMessageProcessor
MuleException
public void stop() throws MuleException
stop
in interface Stoppable
stop
in class AsyncInterceptingMessageProcessor
MuleException
public void dispose()
Disposable
dispose
in interface Disposable
public void pause() throws MuleException
pause
in interface Pausable
MuleException
public void resume() throws MuleException
resume
in interface Resumable
MuleException
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.