protected class TcpMessageReceiver.TcpWorker extends AbstractReceiverResourceWorker implements Disposable, Expirable
| Modifier and Type | Field and Description |
|---|---|
protected TcpInputStream |
dataIn |
protected boolean |
dataInWorkFinished |
protected OutputStream |
dataOut |
protected Object |
notify |
protected TcpProtocol |
protocol |
protected Socket |
socket |
protected InputStream |
underlyingIn |
resourceendpoint, messages, out, receiverPHASE_NAME| Constructor and Description |
|---|
TcpMessageReceiver.TcpWorker(Socket socket,
AbstractMessageReceiver receiver) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bindTransaction(Transaction tx)
Template method used to bind the resources of this receiver to the transaction.
|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
void |
expired() |
protected Object |
getNextMessage(Object resource)
The method used to read the next message 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 boolean |
hasMoreMessages(Object message) |
protected void |
preRouteMuleMessage(DefaultMuleMessage 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.
|
protected void |
shutdownSocket() |
doRunhandleException, postProcessMessage, preProcessMessage, runprotected Socket socket
protected TcpInputStream dataIn
protected InputStream underlyingIn
protected OutputStream dataOut
protected TcpProtocol protocol
protected boolean dataInWorkFinished
protected Object notify
public TcpMessageReceiver.TcpWorker(Socket socket, AbstractMessageReceiver receiver) throws IOException
IOExceptionpublic void dispose()
Disposabledispose in interface Disposablepublic void release()
AbstractReceiverWorkerrelease in interface javax.resource.spi.work.Workrelease in class AbstractReceiverWorkerprotected void shutdownSocket()
throws IOException
IOExceptionprotected void bindTransaction(Transaction tx) throws TransactionException
AbstractReceiverWorkerbindTransaction in class AbstractReceiverWorkertx - the current transaction or null if there is no transactionTransactionExceptionprotected Object getNextMessage(Object resource) throws Exception
AbstractReceiverResourceWorkergetNextMessage in class AbstractReceiverResourceWorkerresource - the resource to read from, this may be a socket, a directory or some higher level
representation.Exceptionprotected boolean hasMoreMessages(Object message)
hasMoreMessages in class AbstractReceiverResourceWorkerprotected void handleResults(List messages) throws Exception
AbstractReceiverWorkerhandleResults in class AbstractReceiverWorkermessages - a list of messages. This argument will not be nullExceptionprotected void preRouteMuleMessage(DefaultMuleMessage message) throws Exception
AbstractReceiverWorkerpreRouteMuleMessage in class AbstractReceiverWorkermessage - the next message to be processedExceptionCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.