org.mule.transport.tcp
Class TcpMessageDispatcher
java.lang.Object
org.mule.transport.AbstractConnectable
org.mule.transport.AbstractMessageDispatcher
org.mule.transport.tcp.TcpMessageDispatcher
- All Implemented Interfaces:
- ExceptionListener, Disposable, Initialisable, Startable, Stoppable, Connectable, MessageDispatcher, MessageDispatching
public class TcpMessageDispatcher
- extends AbstractMessageDispatcher
Send transformed Mule events over TCP.
Methods inherited from class org.mule.transport.AbstractConnectable |
activate, connect, disconnect, disposeAndLogException, doInitialise, doStart, doStop, exceptionThrown, getConnectEventId, getConnectionDescription, getConnector, handleException, isConnected, isDoThreading, isStarted, passivate, setEndpoint, start, stop, toString, validate |
Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
TcpMessageDispatcher
public TcpMessageDispatcher(OutboundEndpoint endpoint)
doDispatch
protected void doDispatch(MuleEvent event)
throws Exception
- Specified by:
doDispatch
in class AbstractMessageDispatcher
- Throws:
Exception
doSend
protected MuleMessage doSend(MuleEvent event)
throws Exception
- Specified by:
doSend
in class AbstractMessageDispatcher
- Throws:
Exception
receiveFromSocket
protected static Object receiveFromSocket(Socket socket,
int timeout,
ImmutableEndpoint endpoint)
throws IOException
- Throws:
IOException
doDispose
protected void doDispose()
- Overrides:
doDispose
in class AbstractConnectable
doConnect
protected void doConnect()
throws Exception
- Overrides:
doConnect
in class AbstractConnectable
- Throws:
Exception
doDisconnect
protected void doDisconnect()
throws Exception
- Overrides:
doDisconnect
in class AbstractConnectable
- Throws:
Exception
validateConnection
public RetryContext validateConnection(RetryContext retryContext)
- Description copied from interface:
Connectable
- Test whether the connector is able to connect to its resource(s).
This will allow a retry policy to go into effect in the case of failure. Implementations must
call either:
Callers should then check for
RetryContext.isOk()
. The failure, if any, will be
provided via the RetryContext.getLastFailure()
.
- Specified by:
validateConnection
in interface Connectable
- Overrides:
validateConnection
in class AbstractConnectable
- Returns:
- same retry context with status info set and any failures populated
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.