|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.transport.AbstractReceiverWorker
public abstract class AbstractReceiverWorker
A base Worker used by Transport MessageReceiver implementations.
| Field Summary | |
|---|---|
protected InboundEndpoint |
endpoint
|
protected List<Object> |
messages
|
protected OutputStream |
out
|
protected AbstractMessageReceiver |
receiver
|
| Constructor Summary | |
|---|---|
AbstractReceiverWorker(List<Object> messages,
AbstractMessageReceiver receiver)
|
|
AbstractReceiverWorker(List<Object> messages,
AbstractMessageReceiver receiver,
OutputStream out)
|
|
| Method Summary | |
|---|---|
protected abstract void |
bindTransaction(Transaction tx)
Template method used to bind the resources of this receiver to the transaction. |
protected void |
doRun()
The actual logic used to receive messages from the underlying transport. |
protected void |
handleResults(List messages)
When Mule has finished processing the current messages, there may be zero or more messages to process by the receiver if request/response messaging is being used. |
protected MuleMessage |
postProcessMessage(MuleMessage message)
If a result is returned back this method will get called before the message is added to te list of results (these are later passed to handleResults(java.util.List)) |
protected Object |
preProcessMessage(Object message)
Before a message is passed into Mule this callback is called and can be used by the worker to inspect the message before it gets sent to Mule |
protected void |
preRouteMuleMessage(MuleMessage message)
This callback is called before a message is routed into Mule and can be used by the worker to set connection specific properties to message before it gets routed |
void |
release()
This method is called once this worker is no longer required. |
void |
run()
This will run the receiver logic and call release() once doRun() completes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Object> messages
protected InboundEndpoint endpoint
protected AbstractMessageReceiver receiver
protected OutputStream out
| Constructor Detail |
|---|
public AbstractReceiverWorker(List<Object> messages,
AbstractMessageReceiver receiver)
public AbstractReceiverWorker(List<Object> messages,
AbstractMessageReceiver receiver,
OutputStream out)
| Method Detail |
|---|
public final void run()
release() once doRun() completes.
run in interface Runnableprotected void doRun()
protected void preRouteMuleMessage(MuleMessage message)
throws Exception
message - the next message to be processed
Exception
protected abstract void bindTransaction(Transaction tx)
throws TransactionException
tx - the current transaction or null if there is no transaction
TransactionException
protected void handleResults(List messages)
throws Exception
messages - a list of messages. This argument will not be null
Exception
protected Object preProcessMessage(Object message)
throws Exception
message - the next message to be processed
Exception
protected MuleMessage postProcessMessage(MuleMessage message)
throws Exception
handleResults(java.util.List))
message - the result message, this will never be null
Exceptionpublic void release()
release in interface javax.resource.spi.work.Work
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||