|
|||||||||||
| 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 |
protected ObjectPool |
proxyPool
A pool of available Mule Proxies. |
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 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)
|
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 |
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 |
protected ObjectPool proxyPool
protected MuleProxy componentProxy
protected UMOWorkManager workManager
protected String descriptorQueueName
protected int queueTimeout
protected boolean enablePooling
protected boolean componentPerRequest
| 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 initialiseUMODescriptor
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()
public void release()
protected void enqueue(UMOEvent event)
throws Exception
Exception
protected UMOEvent dequeue()
throws Exception
Exceptionpublic void workAccepted(WorkEvent event)
public void workRejected(WorkEvent event)
public void workStarted(WorkEvent event)
public void workCompleted(WorkEvent event)
protected void handleWorkException(WorkEvent event,
String type)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||