org.mule.processor
Class SedaStageInterceptingMessageProcessor
java.lang.Object
org.mule.processor.AbstractInterceptingMessageProcessor
org.mule.processor.AsyncInterceptingMessageProcessor
org.mule.processor.OptionalAsyncInterceptingMessageProcessor
org.mule.processor.SedaStageInterceptingMessageProcessor
- All Implemented Interfaces:
- java.lang.Runnable, java.util.EventListener, javax.resource.spi.work.Work, javax.resource.spi.work.WorkListener, Disposable, Initialisable, Lifecycle, Startable, Stoppable, InterceptingMessageProcessor, MessageProcessor, MessageSource
public class SedaStageInterceptingMessageProcessor
- extends OptionalAsyncInterceptingMessageProcessor
- implements javax.resource.spi.work.WorkListener, javax.resource.spi.work.Work, Lifecycle
Processes MuleEvent
's asynchronously using a MuleWorkManager
to
schedule asynchronous processing of the next MessageProcessor
.
Constructor Summary |
SedaStageInterceptingMessageProcessor(java.lang.String name,
QueueProfile queueProfile,
int queueTimeout,
WorkManagerSource workManagerSource,
boolean doThreading,
LifecycleState lifecycleState,
QueueStatistics queueStatistics,
MuleContext muleContext)
Deprecated. |
SedaStageInterceptingMessageProcessor(java.lang.String name,
QueueProfile queueProfile,
int queueTimeout,
WorkManagerSource workManagerSource,
LifecycleState lifecycleState,
QueueStatistics queueStatistics,
MuleContext muleContext)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.resource.spi.work.WorkListener |
workAccepted, workCompleted, workRejected, workStarted |
QUEUE_NAME_PREFIX
protected static final java.lang.String QUEUE_NAME_PREFIX
- See Also:
- Constant Field Values
queueProfile
protected QueueProfile queueProfile
queueTimeout
protected int queueTimeout
lifecycleState
protected LifecycleState lifecycleState
queueStatistics
protected QueueStatistics queueStatistics
muleContext
protected MuleContext muleContext
name
protected java.lang.String name
queue
protected Queue queue
SedaStageInterceptingMessageProcessor
public SedaStageInterceptingMessageProcessor(java.lang.String name,
QueueProfile queueProfile,
int queueTimeout,
WorkManagerSource workManagerSource,
LifecycleState lifecycleState,
QueueStatistics queueStatistics,
MuleContext muleContext)
SedaStageInterceptingMessageProcessor
@Deprecated
public SedaStageInterceptingMessageProcessor(java.lang.String name,
QueueProfile queueProfile,
int queueTimeout,
WorkManagerSource workManagerSource,
boolean doThreading,
LifecycleState lifecycleState,
QueueStatistics queueStatistics,
MuleContext muleContext)
- Deprecated.
processNextAsync
protected void processNextAsync(MuleEvent event)
throws MuleException
- Overrides:
processNextAsync
in class AsyncInterceptingMessageProcessor
- Throws:
MuleException
isStatsEnabled
protected boolean isStatsEnabled()
enqueue
protected void enqueue(MuleEvent event)
throws java.lang.Exception
- Throws:
java.lang.Exception
dequeue
protected MuleEvent dequeue()
throws java.lang.Exception
- Throws:
java.lang.Exception
run
public void run()
- While the service isn't stopped this runs a continuous loop checking for new
events in the queue.
- Specified by:
run
in interface java.lang.Runnable
isQueuePersistent
protected boolean isQueuePersistent()
- Are the events in the SEDA queue persistent?
getQueueSize
public int getQueueSize()
getQueueName
protected java.lang.String getQueueName()
getStageName
protected java.lang.String getStageName()
getStageDescription
protected java.lang.String getStageDescription()
waitIfPaused
protected void waitIfPaused()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
release
public void release()
- Specified by:
release
in interface javax.resource.spi.work.Work
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
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.
- Specified by:
initialise
in interface Initialisable
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
start
public void start()
throws MuleException
- Specified by:
start
in interface Startable
- Overrides:
start
in class AsyncInterceptingMessageProcessor
- Throws:
MuleException
stop
public void stop()
throws MuleException
- Specified by:
stop
in interface Stoppable
- Overrides:
stop
in class AsyncInterceptingMessageProcessor
- Throws:
MuleException
dispose
public void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose
in interface Disposable
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.