org.mule.transport.udp
Class UdpMessageDispatcher

java.lang.Object
  extended by org.mule.transport.AbstractConnectable
      extended by org.mule.transport.AbstractMessageDispatcher
          extended by org.mule.transport.udp.UdpMessageDispatcher
All Implemented Interfaces:
ExceptionListener, Disposable, Initialisable, Startable, Stoppable, Connectable, MessageDispatcher, MessageDispatching

public class UdpMessageDispatcher
extends AbstractMessageDispatcher

UdpMessageDispatcher is responsible for dispatching MuleEvents as UDP packets on the network


Field Summary
protected  UdpConnector connector
           
 
Fields inherited from class org.mule.transport.AbstractConnectable
connected, disposed, endpoint, logger, retryTemplate, started, startOnConnect
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.transport.MessageDispatching
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
 
Constructor Summary
UdpMessageDispatcher(OutboundEndpoint endpoint)
           
 
Method Summary
protected  void doConnect()
           
protected  void doDisconnect()
           
protected  void doDispatch(MuleEvent event)
           
protected  void doDispose()
           
protected  MuleMessage doSend(MuleEvent event)
           
 RetryContext validateConnection(RetryContext retryContext)
          Test whether the connector is able to connect to its resource(s).
protected  void write(DatagramSocket socket, byte[] data, int port, InetAddress inetAddress)
           
 
Methods inherited from class org.mule.transport.AbstractMessageDispatcher
dispatch, dispose, getEndpoint, getWorkManager, initialise, isTransactionRollback, returnResponse, send
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mule.api.transport.MessageDispatcher
activate, getConnector, passivate, validate
 
Methods inherited from interface org.mule.api.transport.Connectable
connect, disconnect, getConnectionDescription, isConnected
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 

Field Detail

connector

protected final UdpConnector connector
Constructor Detail

UdpMessageDispatcher

public UdpMessageDispatcher(OutboundEndpoint endpoint)
Method Detail

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

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

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 AbstractConnectable


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.