|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mule.impl.model.AbstractComponent
org.mule.impl.model.seda.SedaComponent
A Seda component runs inside a Seda Model and is responsible for managing a Seda Queue and thread pool for a Mule sevice component. In Seda terms this is equivilent to a stage.
| Field Summary | |
protected boolean |
componentPerRequest
If this is set to true a new component will be created for every request. |
protected MuleProxy |
componentProxy
Is created only if component pooling is turned off on the SEDAModel. |
protected String |
descriptorQueueName
|
protected boolean |
enablePooling
Whether component objects should be pooled or a single instance should be used. |
static String |
POOLING_PROFILE_PROPERTY
|
protected PoolingProfile |
poolingProfile
The pooling configuration used when initialising the component described by this descriptor. |
protected ObjectPool |
proxyPool
A pool of available Mule proxies. |
static String |
QUEUE_PROFILE_PROPERTY
|
protected QueueProfile |
queueProfile
The queuing profile for events received for this component. |
protected int |
queueTimeout
The time out used for taking from the Seda Queue. |
protected UMOWorkManager |
workManager
|
| Fields inherited from class org.mule.impl.model.AbstractComponent |
descriptor, exceptionListener, initialised, logger, model, paused, poolInitialised, stats, stopped, stopping |
| Constructor Summary | |
SedaComponent(MuleDescriptor descriptor,
SedaModel model)
Creates a new SEDA component. |
|
| Method Summary | |
protected MuleProxy |
createComponentProxy()
|
protected ObjectPool |
createPool()
|
protected ComponentStatistics |
createStatistics()
|
protected UMOEvent |
dequeue()
|
protected void |
doDispatch(UMOEvent event)
|
protected void |
doDispose()
|
void |
doForceStop()
|
void |
doInitialise()
Initialise the component. |
UMOMessage |
doSend(UMOEvent event)
|
void |
doStart()
|
void |
doStop()
|
protected void |
enqueue(UMOEvent event)
|
PoolingProfile |
getPoolingProfile()
|
protected MuleProxy |
getProxy()
The proxy may be one of three types: 1. |
QueueProfile |
getQueueProfile()
|
int |
getQueueSize()
|
protected void |
handleWorkException(WorkEvent event,
String type)
|
protected void |
initialisePool()
|
void |
release()
|
void |
run()
While the component isn't stopped this runs a continuous loop checking for new events in the queue. |
void |
setPoolingProfile(PoolingProfile poolingProfile)
|
void |
setQueueProfile(QueueProfile queueProfile)
|
void |
workAccepted(WorkEvent event)
|
void |
workCompleted(WorkEvent event)
|
void |
workRejected(WorkEvent event)
|
void |
workStarted(WorkEvent event)
|
| Methods inherited from class org.mule.impl.model.AbstractComponent |
connectListeners, disconnectListeners, dispatchEvent, dispose, doPause, doResume, fireComponentNotification, forceStop, getDescriptor, getIncomingEndpoints, getInstance, getName, getStatistics, handleException, initialise, isPaused, isStarted, isStopped, isStopping, lookupComponent, pause, registerListeners, resume, sendEvent, start, start, startListeners, stop, stopListeners, toString, unregisterListeners, waitIfPaused |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String QUEUE_PROFILE_PROPERTY
public static final String POOLING_PROFILE_PROPERTY
protected ObjectPool proxyPool
protected MuleProxy componentProxy
componentPerRequest flag is set on the model.
protected UMOWorkManager workManager
protected String descriptorQueueName
protected int queueTimeout
protected boolean enablePooling
protected boolean componentPerRequest
protected PoolingProfile poolingProfile
protected QueueProfile queueProfile
| Constructor Detail |
public SedaComponent(MuleDescriptor descriptor,
SedaModel model)
descriptor - The descriptor of the component to creatmodel - the model in which the component is registered| Method Detail |
public void doInitialise()
throws InitialisationException
doInitialise in class AbstractComponentInitialisationException - if the component fails
to initialiseUMODescriptorprotected ComponentStatistics createStatistics()
createStatistics in class AbstractComponent
protected ObjectPool createPool()
throws InitialisationException
InitialisationException
protected void initialisePool()
throws InitialisationException
InitialisationException
protected MuleProxy createComponentProxy()
throws InitialisationException
InitialisationException
public void doForceStop()
throws UMOException
doForceStop in class AbstractComponentUMOException
public void doStop()
throws UMOException
doStop in class AbstractComponentUMOException
public void doStart()
throws UMOException
doStart in class AbstractComponentUMOExceptionprotected void doDispose()
doDispose in class AbstractComponent
protected void doDispatch(UMOEvent event)
throws UMOException
doDispatch in class AbstractComponentUMOException
public UMOMessage doSend(UMOEvent event)
throws UMOException
doSend in class AbstractComponentUMOExceptionpublic int getQueueSize()
public void run()
run in interface Runnable
protected MuleProxy getProxy()
throws Exception
Exceptionpublic void release()
release in interface Work
protected void enqueue(UMOEvent event)
throws Exception
Exception
protected UMOEvent dequeue()
throws Exception
Exceptionpublic void workAccepted(WorkEvent event)
workAccepted in interface WorkListenerpublic void workRejected(WorkEvent event)
workRejected in interface WorkListenerpublic void workStarted(WorkEvent event)
workStarted in interface WorkListenerpublic void workCompleted(WorkEvent event)
workCompleted in interface WorkListener
protected void handleWorkException(WorkEvent event,
String type)
public PoolingProfile getPoolingProfile()
public void setPoolingProfile(PoolingProfile poolingProfile)
public QueueProfile getQueueProfile()
public void setQueueProfile(QueueProfile queueProfile)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||