org.mule.providers.udp
Class UdpConnector

java.lang.Object
  extended byorg.mule.providers.AbstractConnector
      extended byorg.mule.providers.udp.UdpConnector
All Implemented Interfaces:
Disposable, EventListener, ExceptionListener, Initialisable, UMOConnectable, UMOConnector, WorkListener
Direct Known Subclasses:
MulticastConnector

public class UdpConnector
extends AbstractConnector

UdpConnector can send and receive Mule events as Datagram packets.


Field Summary
protected  boolean broadcast
           
static int DEFAULT_BUFFER_SIZE
           
static int DEFAULT_SOCKET_TIMEOUT
           
protected  GenericKeyedObjectPool dispatcherSocketsPool
           
static String KEEP_SEND_SOCKET_OPEN_PROPERTY
           
protected  boolean keepSendSocketOpen
           
protected  int receiveBufferSize
           
protected  int receiveTimeout
           
protected  int sendBufferSize
           
protected  int sendTimeout
           
 
Fields inherited from class org.mule.providers.AbstractConnector
connected, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, name, numberOfConcurrentTransactedReceivers, receivers, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
UdpConnector()
           
 
Method Summary
protected  void doConnect()
          Template method where any connections should be made for the connector
protected  void doDisconnect()
          Template method where any connected resources used by the connector should be disconnected
protected  void doDispose()
          Template method to perform any work when destroying the connectoe
protected  void doInitialise()
           
protected  void doStart()
          Template method to perform any work when starting the connectoe
protected  void doStop()
          Template method to perform any work when stopping the connectoe
 int getBufferSize()
          Deprecated. Should use getSendBufferSize() or getReceiveBufferSize()
 String getProtocol()
           
 int getReceiveBufferSize()
           
protected  Object getReceiverKey(UMOComponent component, UMOEndpoint endpoint)
          The method determines the key used to store the receiver against.
 int getReceiveTimeout()
           
 int getSendBufferSize()
           
 int getSendTimeout()
           
 boolean isBroadcast()
           
 boolean isKeepSendSocketOpen()
           
 void setBroadcast(boolean broadcast)
           
 void setBufferSize(int bufferSize)
          Deprecated. Should use setSendBufferSize(int) or setReceiveBufferSize(int)
 void setKeepSendSocketOpen(boolean keepSendSocketOpen)
           
 void setReceiveBufferSize(int receiveBufferSize)
           
 void setReceiveTimeout(int timeout)
           
 void setSendBufferSize(int sendBufferSize)
           
 void setSendTimeout(int timeout)
           
 void setTimeout(int timeout)
          Deprecated. The time out should be set explicitly for each
 
Methods inherited from class org.mule.providers.AbstractConnector
checkDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMessageAdapter, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getStreamMessageAdapter, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isStarted, lookupReceiver, receive, receive, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setMaxDispatchersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, startConnector, stopConnector, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SOCKET_TIMEOUT

public static final int DEFAULT_SOCKET_TIMEOUT
See Also:
Constant Field Values

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

KEEP_SEND_SOCKET_OPEN_PROPERTY

public static final String KEEP_SEND_SOCKET_OPEN_PROPERTY
See Also:
Constant Field Values

sendTimeout

protected int sendTimeout

receiveTimeout

protected int receiveTimeout

sendBufferSize

protected int sendBufferSize

receiveBufferSize

protected int receiveBufferSize

keepSendSocketOpen

protected boolean keepSendSocketOpen

broadcast

protected boolean broadcast

dispatcherSocketsPool

protected GenericKeyedObjectPool dispatcherSocketsPool
Constructor Detail

UdpConnector

public UdpConnector()
Method Detail

doInitialise

protected void doInitialise()
                     throws InitialisationException
Specified by:
doInitialise in class AbstractConnector
Throws:
InitialisationException

doDispose

protected void doDispose()
Description copied from class: AbstractConnector
Template method to perform any work when destroying the connectoe

Specified by:
doDispose in class AbstractConnector

doConnect

protected void doConnect()
                  throws Exception
Description copied from class: AbstractConnector
Template method where any connections should be made for the connector

Specified by:
doConnect in class AbstractConnector
Throws:
Exception

doDisconnect

protected void doDisconnect()
                     throws Exception
Description copied from class: AbstractConnector
Template method where any connected resources used by the connector should be disconnected

Specified by:
doDisconnect in class AbstractConnector
Throws:
Exception

doStart

protected void doStart()
                throws UMOException
Description copied from class: AbstractConnector
Template method to perform any work when starting the connectoe

Specified by:
doStart in class AbstractConnector
Throws:
UMOException - if the method fails

doStop

protected void doStop()
               throws UMOException
Description copied from class: AbstractConnector
Template method to perform any work when stopping the connectoe

Specified by:
doStop in class AbstractConnector
Throws:
UMOException - if the method fails

getProtocol

public String getProtocol()
Returns:
the primary protocol name for endpoints of this connector

setTimeout

public void setTimeout(int timeout)
Deprecated. The time out should be set explicitly for each

A shorthand property setting timeout for both SEND and RECEIVE sockets.


getSendTimeout

public int getSendTimeout()

setSendTimeout

public void setSendTimeout(int timeout)

getReceiveTimeout

public int getReceiveTimeout()

setReceiveTimeout

public void setReceiveTimeout(int timeout)

getBufferSize

public int getBufferSize()
Deprecated. Should use getSendBufferSize() or getReceiveBufferSize()

Returns:

setBufferSize

public void setBufferSize(int bufferSize)
Deprecated. Should use setSendBufferSize(int) or setReceiveBufferSize(int)

Parameters:
bufferSize -

getSendBufferSize

public int getSendBufferSize()

setSendBufferSize

public void setSendBufferSize(int sendBufferSize)

getReceiveBufferSize

public int getReceiveBufferSize()

setReceiveBufferSize

public void setReceiveBufferSize(int receiveBufferSize)

isBroadcast

public boolean isBroadcast()

setBroadcast

public void setBroadcast(boolean broadcast)

isKeepSendSocketOpen

public boolean isKeepSendSocketOpen()

setKeepSendSocketOpen

public void setKeepSendSocketOpen(boolean keepSendSocketOpen)

getReceiverKey

protected Object getReceiverKey(UMOComponent component,
                                UMOEndpoint endpoint)
Description copied from class: AbstractConnector
The method determines the key used to store the receiver against.

Overrides:
getReceiverKey in class AbstractConnector
Parameters:
component - the component for which the endpoint is being registered
endpoint - the endpoint being registered for the component
Returns:
the key to store the newly created receiver against


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