org.mule.transport.udp
Class UdpMessageDispatcher
java.lang.Object
org.mule.transport.AbstractTransportMessageHandler
org.mule.transport.AbstractMessageDispatcher
org.mule.transport.udp.UdpMessageDispatcher
- All Implemented Interfaces:
- Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, MessageProcessor, Connectable, MessageDispatcher
public class UdpMessageDispatcher
- extends AbstractMessageDispatcher
UdpMessageDispatcher
is responsible for dispatching MuleEvents as
UDP packets on the network
Methods inherited from class org.mule.transport.AbstractTransportMessageHandler |
activate, connect, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doInitialise, doStart, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initialise, initializeMessageFactory, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopping, 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 |
connector
protected final UdpConnector connector
UdpMessageDispatcher
public UdpMessageDispatcher(OutboundEndpoint endpoint)
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 AbstractTransportMessageHandler
- Returns:
- same retry context with status info set and any failures populated
doConnect
protected void doConnect()
throws Exception
- Overrides:
doConnect
in class AbstractTransportMessageHandler
- Throws:
Exception
doDisconnect
protected void doDisconnect()
throws Exception
- Overrides:
doDisconnect
in class AbstractTransportMessageHandler
- Throws:
Exception
doDispatch
protected void doDispatch(MuleEvent event)
throws Exception
- Specified by:
doDispatch
in class AbstractMessageDispatcher
- Throws:
Exception
write
protected void write(DatagramSocket socket,
byte[] data,
int port,
InetAddress inetAddress)
throws IOException
- Throws:
IOException
doSend
protected MuleMessage doSend(MuleEvent event)
throws Exception
- Specified by:
doSend
in class AbstractMessageDispatcher
- Throws:
Exception
doDispose
protected void doDispose()
- Overrides:
doDispose
in class AbstractTransportMessageHandler
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.