org.mule.providers.udp
Class UdpMessageDispatcher

java.lang.Object
  extended byorg.mule.providers.AbstractMessageDispatcher
      extended byorg.mule.providers.udp.UdpMessageDispatcher
All Implemented Interfaces:
Disposable, java.beans.ExceptionListener, UMOMessageDispatcher
Direct Known Subclasses:
MulticastMessageDispatcher

public class UdpMessageDispatcher
extends AbstractMessageDispatcher

UdpMessageDispatcher TODO

Version:
$Revision: 1.3 $
Author:
Ross Mason

Field Summary
protected  UdpConnector connector
           
protected  java.net.InetAddress inetAddress
           
protected  SynchronizedBoolean initialised
           
protected  int port
           
protected  java.net.DatagramSocket socket
           
 
Fields inherited from class org.mule.providers.AbstractMessageDispatcher
disposed, disposeOnCompletion, doThreading, logger, workManager
 
Fields inherited from interface org.mule.umo.provider.UMOMessageDispatcher
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
 
Constructor Summary
UdpMessageDispatcher(UdpConnector connector)
           
 
Method Summary
protected  java.net.DatagramSocket createSocket(int port, java.net.InetAddress inetAddress)
           
 void doDispatch(UMOEvent event)
           
 void doDispose()
           
 UMOMessage doSend(UMOEvent event)
           
 UMOConnector getConnector()
           
 java.lang.Object getDelegateSession()
           
protected  void initialise(java.lang.String endpoint)
           
 UMOMessage receive(UMOEndpointURI endpointUri, long timeout)
           
protected  void write(java.net.DatagramSocket socket, byte[] data)
           
 
Methods inherited from class org.mule.providers.AbstractMessageDispatcher
dispatch, dispose, exceptionThrown, isDisposed, send
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connector

protected UdpConnector connector

inetAddress

protected java.net.InetAddress inetAddress

socket

protected java.net.DatagramSocket socket

port

protected int port

initialised

protected SynchronizedBoolean initialised
Constructor Detail

UdpMessageDispatcher

public UdpMessageDispatcher(UdpConnector connector)
Method Detail

createSocket

protected java.net.DatagramSocket createSocket(int port,
                                               java.net.InetAddress inetAddress)
                                        throws java.io.IOException
Throws:
java.io.IOException

initialise

protected void initialise(java.lang.String endpoint)
                   throws java.io.IOException,
                          java.net.URISyntaxException
Throws:
java.io.IOException
java.net.URISyntaxException

doDispatch

public void doDispatch(UMOEvent event)
                throws java.lang.Exception
Specified by:
doDispatch in class AbstractMessageDispatcher
Throws:
java.lang.Exception

write

protected void write(java.net.DatagramSocket socket,
                     byte[] data)
              throws java.io.IOException
Throws:
java.io.IOException

doSend

public UMOMessage doSend(UMOEvent event)
                  throws java.lang.Exception
Specified by:
doSend in class AbstractMessageDispatcher
Throws:
java.lang.Exception

receive

public UMOMessage receive(UMOEndpointURI endpointUri,
                          long timeout)
                   throws java.lang.Exception
Throws:
java.lang.Exception

getDelegateSession

public java.lang.Object getDelegateSession()
                                    throws UMOException
Throws:
UMOException

getConnector

public UMOConnector getConnector()
Specified by:
getConnector in interface UMOMessageDispatcher
Overrides:
getConnector in class AbstractMessageDispatcher

doDispose

public void doDispose()
Specified by:
doDispose in class AbstractMessageDispatcher


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.