org.mule.providers
Class AbstractConnector

java.lang.Object
  extended byorg.mule.providers.AbstractConnector
All Implemented Interfaces:
Disposable, ExceptionListener, Initialisable, UMOConnectable, UMOConnector
Direct Known Subclasses:
AbstractServiceEnabledConnector, TestConnector

public abstract class AbstractConnector
extends Object
implements UMOConnector, ExceptionListener, UMOConnectable

AbstractConnector provides base functionality for all connectors provided with Mule. Connectors are the mechanism used to connect to external systems and protocols in order to send and receive data.

The AbstractConnector provides getter and setter methods for endpoint name, transport name and protocol. It also provides methods to stop and start connecotors and sets up a dispatcher threadpool which allows deriving connectors the possibility to dispatch work to separate threads. This functionality is controlled with the doThreading property on the threadingProfiles for dispachers and receivers. The lifecycle for a connector is -

  1. Create
  2. Initialise
  3. Connect
  4. Connect receivers
  5. Start
  6. Start Receivers
  7. Stop
  8. Stop Receivers
  9. Disconnect
  10. Disconnect Receivers
  11. Dispose
  12. Dispose Receivers

Version:
$Revision: 3982 $
Author:
Ross Mason

Field Summary
protected  WaitableBoolean connected
           
protected  WaitableBoolean connecting
           
protected  boolean createDispatcherPerRequest
          Determines whether dispatchers should be disposed straight away of after every request or cached
protected  boolean createMultipleTransactedReceivers
          For better throughput when using TransactedMessageReceivers.
protected  UMOTransformer defaultInboundTransformer
          The service descriptor can define a default inbound transformer to be used on an endpoint if no other is set
protected  UMOTransformer defaultOutboundTransformer
          The service descriptor can define a default outbound transformer to be used on an endpoint if no other is set
protected  UMOTransformer defaultResponseTransformer
          For some connectors such as http, a response transformer is required or where a replyTo needs a trnasformer
protected  UMOMessageDispatcherFactory dispatcherFactory
          Factory used to create dispatchers for this connector
protected  ConcurrentMap dispatchers
          A pool of dispa tchers for this connector, the pool is keyed on endpointUri
protected  AtomicBoolean disposed
          Determines in the connector is alive and well
protected  AtomicBoolean disposing
          Determines in connector has been told to dispose
protected  ExceptionListener exceptionListener
          The exception strategy used by this connector
protected  AtomicBoolean initialised
          True once the endpoint has been initialsed
protected  Log logger
          logger used by this class
protected  String name
          The name that identifies the endpoint
protected  ConcurrentMap receivers
          The collection of listeners on this connector.
protected  boolean serverSide
          The flag determines if the connector is being used on the server side or client.
protected  UMOSessionHandler sessionHandler
          The strategy used for reading and writing session information to and fromt he transport
protected  AtomicBoolean started
          Specifies if the endpoint started
protected  WaitableBoolean startOnConnect
          If the connect method was called via the start method, this will be set so that when the connector comes on line it will be started
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
AbstractConnector()
           
 
Method Summary
protected  void checkDisposed()
           
 void connect()
          Make the connection to the underlying transport.
protected  UMOMessageDispatcher createDispatcher(UMOImmutableEndpoint endpoint)
           
abstract  UMOMessageReceiver createReceiver(UMOComponent component, UMOEndpoint endpoint)
           
 void destroyReceiver(UMOMessageReceiver receiver, UMOEndpoint endpoint)
           
 void disconnect()
          Disconnect the from the underlying transport
 void dispose()
          A lifecycle method where implementor should free up any resources.
protected  void disposeDispatchers()
           
protected  void disposeReceivers()
           
 void doConnect()
          Template method where any connections should be made for the connector
 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
 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
 void exceptionThrown(Exception e)
           
 void fireNotification(UMOServerNotification notification)
          Fires a server notification to all registered CustomNotificationListener eventManager.
protected  String getConnectEventId()
          The resource id used when firing ConnectEvents from this connector
 String getConnectionDescription()
          Returns a string identifying the underlying resource
 ConnectionStrategy getConnectionStrategy()
           
 UMOTransformer getDefaultInboundTransformer()
           
 UMOTransformer getDefaultOutboundTransformer()
           
 UMOTransformer getDefaultResponseTransformer()
           
 UMOMessageDispatcher getDispatcher(UMOImmutableEndpoint endpoint)
          The connector can pool dispatchers based on their endpointUri or can ingnore the endpointUri altogether and use a ThreadLocal or always create new.
 UMOMessageDispatcher getDispatcher(UMOImmutableEndpoint endpoint, boolean createDispatcherIfNotExists)
           
 UMOMessageDispatcherFactory getDispatcherFactory()
          The dispatcher factory is used to create a message dispatcher of the current request
 Map getDispatchers()
          Deprecated. this method will go away soon.
 ThreadingProfile getDispatcherThreadingProfile()
           
 ExceptionListener getExceptionListener()
           
 String getName()
           
abstract  String getProtocol()
           
 AbstractMessageReceiver getReceiver(String key)
          Deprecated. Use lookupReceiver instead
 AbstractMessageReceiver getReceiver(UMOComponent component, UMOEndpoint endpoint)
           
protected  Object getReceiverKey(UMOComponent component, UMOEndpoint endpoint)
          The method determines the key used to store the receiver against.
 Map getReceivers()
           
 AbstractMessageReceiver[] getReceivers(String wildcardExpression)
           
 ThreadingProfile getReceiverThreadingProfile()
           
 ReplyToHandler getReplyToHandler()
           
 UMOSessionHandler getSessionHandler()
           
 List getSupportedProtocols()
          Returns an unmodifiable list of the protocols supported by this connector
 void handleException(Exception exception)
           
protected  void handleWorkException(WorkEvent event, String type)
           
 void initialise()
          Method used to perform any initialisation work.
 boolean isConnected()
          Determines if this object is connected or not
 boolean isCreateDispatcherPerRequest()
          controls whether dispatchers or cached or created per request Note that if an exception occurs in the Dispatcher it is automatically disposed of and a new one is created for the next request.
 boolean isCreateMultipleTransactedReceivers()
          For better throughput when using TransactedMessageReceivers.
 boolean isDisposed()
           
 boolean isDisposing()
           
 boolean isEnableMessageEvents()
          Whether to fire message notifications for every message that is sent or received from this connector
 boolean isRemoteSyncEnabled()
           
 boolean isServerSide()
          The flag determines if the connector is being used on the server side or client.
 boolean isStarted()
           
 boolean isUseSingleDispatcherThreadPool()
          Should a single dispatcher thread pool be created for all distachers It is recommended that if you have a lot of dispatcher being created per connector that this should be set to true i.e.
 boolean isUseSingleReceiverThreadPool()
          Should a single receiver thread pool be created for all receivers It is recommended that if you have a lot of receivers being registered per connector that this should be set to true
 UMOMessageDispatcher lookupDispatcher(String key)
           
 UMOMessageReceiver lookupReceiver(String key)
           
 UMOMessageReceiver registerListener(UMOComponent component, UMOEndpoint endpoint)
          This creates a UMOMessageReceiver associated with this endpoint and registers it with the connector
 void registerSupportedProtocol(String protocol)
          Registers other protocols 'understood' by this connector.
protected  void registerSupportedProtocolWithotPrefix(String protocol)
          Registers other protocols 'understood' by this connector.
 void setConnectionStrategy(ConnectionStrategy connectionStrategy)
           
 void setCreateDispatcherPerRequest(boolean createDispatcherPerRequest)
          controls whether dispatchers or cached or created per request Note that if an exception occurs in the Dispatcher it is automatically disposed of and a new one is created for the next request.
 void setCreateMultipleTransactedReceivers(boolean createMultipleTransactedReceivers)
          For better throughput when using TransactedMessageReceivers.
 void setDefaultInboundTransformer(UMOTransformer defaultInboundTransformer)
           
 void setDefaultOutboundTransformer(UMOTransformer defaultOutboundTransformer)
           
 void setDefaultResponseTransformer(UMOTransformer defaultResponseTransformer)
           
 void setDispatcherFactory(UMOMessageDispatcherFactory dispatcherFactory)
          The dispatcher factory is used to create a message dispatcher of the current request
 void setDispatcherThreadingProfile(ThreadingProfile dispatcherThreadingProfile)
           
 void setEnableMessageEvents(boolean enableMessageEvents)
          Whether to fire message notifications for every message that is sent or received from this connector
 void setExceptionListener(ExceptionListener listener)
           
 void setName(String newName)
           
 void setReceiverThreadingProfile(ThreadingProfile receiverThreadingProfile)
           
 void setServerSide(boolean serverSide)
          The flag determines if the connector is being used on the server side or client.
 void setSessionHandler(UMOSessionHandler sessionHandler)
           
 void setSupportedProtocols(List supportedProtocols)
          Sets A list of protocols that the connector can accept
 void setUseSingleDispatcherThreadPool(boolean useSingleDispatcherThreadPool)
          Should a single dispatcher thread pool be created for all distachers It is recommended that if you have a lot of dispatcher being created per connector that this should be set to true i.e.
 void setUseSingleReceiverThreadPool(boolean useSingleReceiverThreadPool)
          Should a single dispatcher thread pool be created for all recivers It is recommended that if you have a lot of receivers being registered per connector that this should be set to true
 void startConnector()
           
 void stopConnector()
           
 boolean supportsProtocol(String protocol)
           
 void unregisterListener(UMOComponent component, UMOEndpoint endpoint)
           
 void unregisterSupportedProtocol(String protocol)
           
 void workAccepted(WorkEvent event)
           
 void workCompleted(WorkEvent event)
           
 void workRejected(WorkEvent event)
           
 void workStarted(WorkEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.provider.UMOConnector
getMessageAdapter, getStreamMessageAdapter
 

Field Detail

logger

protected transient Log logger
logger used by this class


started

protected AtomicBoolean started
Specifies if the endpoint started


initialised

protected AtomicBoolean initialised
True once the endpoint has been initialsed


name

protected String name
The name that identifies the endpoint


exceptionListener

protected ExceptionListener exceptionListener
The exception strategy used by this connector


disposed

protected AtomicBoolean disposed
Determines in the connector is alive and well


disposing

protected AtomicBoolean disposing
Determines in connector has been told to dispose


dispatcherFactory

protected UMOMessageDispatcherFactory dispatcherFactory
Factory used to create dispatchers for this connector


dispatchers

protected ConcurrentMap dispatchers
A pool of dispa tchers for this connector, the pool is keyed on endpointUri


receivers

protected ConcurrentMap receivers
The collection of listeners on this connector. Keyed by entrypoint


createDispatcherPerRequest

protected boolean createDispatcherPerRequest
Determines whether dispatchers should be disposed straight away of after every request or cached


createMultipleTransactedReceivers

protected boolean createMultipleTransactedReceivers
For better throughput when using TransactedMessageReceivers. This will create an number of receiver threads based on the ThreadingProfile configured fro the receiver. This property is user by transports that support transactions, specifically MessageReceivers that extend the TransactedPollingMessageReceiver.


defaultInboundTransformer

protected UMOTransformer defaultInboundTransformer
The service descriptor can define a default inbound transformer to be used on an endpoint if no other is set


defaultOutboundTransformer

protected UMOTransformer defaultOutboundTransformer
The service descriptor can define a default outbound transformer to be used on an endpoint if no other is set


defaultResponseTransformer

protected UMOTransformer defaultResponseTransformer
For some connectors such as http, a response transformer is required or where a replyTo needs a trnasformer


connected

protected WaitableBoolean connected

connecting

protected WaitableBoolean connecting

startOnConnect

protected WaitableBoolean startOnConnect
If the connect method was called via the start method, this will be set so that when the connector comes on line it will be started


serverSide

protected boolean serverSide
The flag determines if the connector is being used on the server side or client. If true receiver threads will be given a slightly higher priority.


sessionHandler

protected UMOSessionHandler sessionHandler
The strategy used for reading and writing session information to and fromt he transport

Constructor Detail

AbstractConnector

public AbstractConnector()
Method Detail

getName

public String getName()
Specified by:
getName in interface UMOConnector
Returns:
the name associated with the endpoint

setName

public void setName(String newName)
Specified by:
setName in interface UMOConnector
Parameters:
newName - the name to associate with the endpoint

initialise

public final void initialise()
                      throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown

getProtocol

public abstract String getProtocol()
Specified by:
getProtocol in interface UMOConnector
Returns:
the protocol name for the endpoint

startConnector

public final void startConnector()
                          throws UMOException
Specified by:
startConnector in interface UMOConnector
Throws:
UMOException

isStarted

public boolean isStarted()
Specified by:
isStarted in interface UMOConnector
Returns:
true if the endpoint is started

stopConnector

public final void stopConnector()
                         throws UMOException
Specified by:
stopConnector in interface UMOConnector
Throws:
UMOException

dispose

public final void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

disposeReceivers

protected void disposeReceivers()

disposeDispatchers

protected void disposeDispatchers()

isDisposed

public boolean isDisposed()
Specified by:
isDisposed in interface UMOConnector
Returns:
false if the connector is alive and well or true if the connector is being destroyed

handleException

public void handleException(Exception exception)
Specified by:
handleException in interface UMOConnector
Parameters:
exception - the exception that was caught

exceptionThrown

public void exceptionThrown(Exception e)
Specified by:
exceptionThrown in interface ExceptionListener

getExceptionListener

public ExceptionListener getExceptionListener()
Specified by:
getExceptionListener in interface UMOConnector
Returns:
the ExceptionStrategy for this endpoint
See Also:
ExceptionListener

setExceptionListener

public void setExceptionListener(ExceptionListener listener)
Specified by:
setExceptionListener in interface UMOConnector
Parameters:
listener - the ExceptionStrategy to use with this endpoint
See Also:
ExceptionListener

getDispatcherFactory

public UMOMessageDispatcherFactory getDispatcherFactory()
Description copied from interface: UMOConnector
The dispatcher factory is used to create a message dispatcher of the current request

Specified by:
getDispatcherFactory in interface UMOConnector
Returns:
Returns the dispatcherFactory.

setDispatcherFactory

public void setDispatcherFactory(UMOMessageDispatcherFactory dispatcherFactory)
Description copied from interface: UMOConnector
The dispatcher factory is used to create a message dispatcher of the current request

Specified by:
setDispatcherFactory in interface UMOConnector
Parameters:
dispatcherFactory - The dispatcherFactory to set.

getDispatcher

public UMOMessageDispatcher getDispatcher(UMOImmutableEndpoint endpoint)
                                   throws UMOException
Description copied from interface: UMOConnector
The connector can pool dispatchers based on their endpointUri or can ingnore the endpointUri altogether and use a ThreadLocal or always create new.

Specified by:
getDispatcher in interface UMOConnector
Parameters:
endpoint - the endpoint that can be used to key cached dispatchers
Returns:
the component associated with the endpointUri If there is no component for the current thread one will be created
Throws:
UMOException - if creation of a component fails

getDispatcher

public UMOMessageDispatcher getDispatcher(UMOImmutableEndpoint endpoint,
                                          boolean createDispatcherIfNotExists)
                                   throws UMOException
Throws:
UMOException

lookupDispatcher

public UMOMessageDispatcher lookupDispatcher(String key)

checkDisposed

protected void checkDisposed()
                      throws DisposeException
Throws:
DisposeException

createDispatcher

protected UMOMessageDispatcher createDispatcher(UMOImmutableEndpoint endpoint)
                                         throws UMOException
Throws:
UMOException

registerListener

public UMOMessageReceiver registerListener(UMOComponent component,
                                           UMOEndpoint endpoint)
                                    throws Exception
Description copied from interface: UMOConnector
This creates a UMOMessageReceiver associated with this endpoint and registers it with the connector

Specified by:
registerListener in interface UMOConnector
Parameters:
component - the listening component
endpoint - the endpoint contains the listener endpointUri on which to listen on.
Throws:
Exception - if the UMOMessageReceiver cannot be created or the Receiver cannot be registered

getReceiverKey

protected Object getReceiverKey(UMOComponent component,
                                UMOEndpoint endpoint)
The method determines the key used to store the receiver against.

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

unregisterListener

public final void unregisterListener(UMOComponent component,
                                     UMOEndpoint endpoint)
                              throws Exception
Specified by:
unregisterListener in interface UMOConnector
Parameters:
component - the listening component
endpoint - the associated endpointDescriptor with the listener
Throws:
Exception - if the listener cannot be unregistered. If a listener is not associated with the given endpoint this will not throw an exception

getDispatcherThreadingProfile

public ThreadingProfile getDispatcherThreadingProfile()

setDispatcherThreadingProfile

public void setDispatcherThreadingProfile(ThreadingProfile dispatcherThreadingProfile)

getReceiverThreadingProfile

public ThreadingProfile getReceiverThreadingProfile()

setReceiverThreadingProfile

public void setReceiverThreadingProfile(ThreadingProfile receiverThreadingProfile)

createReceiver

public abstract UMOMessageReceiver createReceiver(UMOComponent component,
                                                  UMOEndpoint endpoint)
                                           throws Exception
Throws:
Exception

destroyReceiver

public void destroyReceiver(UMOMessageReceiver receiver,
                            UMOEndpoint endpoint)
                     throws Exception
Throws:
Exception

doStart

protected void doStart()
                throws UMOException
Template method to perform any work when starting the connectoe

Throws:
UMOException - if the method fails

doStop

protected void doStop()
               throws UMOException
Template method to perform any work when stopping the connectoe

Throws:
UMOException - if the method fails

doDispose

protected void doDispose()
Template method to perform any work when destroying the connectoe


doInitialise

public void doInitialise()
                  throws InitialisationException
Throws:
InitialisationException

getDefaultInboundTransformer

public UMOTransformer getDefaultInboundTransformer()

setDefaultInboundTransformer

public void setDefaultInboundTransformer(UMOTransformer defaultInboundTransformer)

getDefaultResponseTransformer

public UMOTransformer getDefaultResponseTransformer()

getDefaultOutboundTransformer

public UMOTransformer getDefaultOutboundTransformer()

setDefaultOutboundTransformer

public void setDefaultOutboundTransformer(UMOTransformer defaultOutboundTransformer)

setDefaultResponseTransformer

public void setDefaultResponseTransformer(UMOTransformer defaultResponseTransformer)

getReplyToHandler

public ReplyToHandler getReplyToHandler()

getDispatchers

public Map getDispatchers()
Deprecated. this method will go away soon.


fireNotification

public void fireNotification(UMOServerNotification notification)
Fires a server notification to all registered CustomNotificationListener eventManager.

Parameters:
notification - the notification to fire. This must be of type CustomNotification otherwise an exception will be thrown.
Throws:
UnsupportedOperationException - if the notification fired is not a CustomNotification

getConnectionStrategy

public ConnectionStrategy getConnectionStrategy()

setConnectionStrategy

public void setConnectionStrategy(ConnectionStrategy connectionStrategy)

isDisposing

public boolean isDisposing()
Specified by:
isDisposing in interface UMOConnector
Returns:
false if the connector is alive and well or true if the connector has been told to dispose

isRemoteSyncEnabled

public boolean isRemoteSyncEnabled()
Specified by:
isRemoteSyncEnabled in interface UMOConnector

getReceiver

public AbstractMessageReceiver getReceiver(UMOComponent component,
                                           UMOEndpoint endpoint)

getReceivers

public Map getReceivers()

lookupReceiver

public UMOMessageReceiver lookupReceiver(String key)

getReceiver

public AbstractMessageReceiver getReceiver(String key)
Deprecated. Use lookupReceiver instead


getReceivers

public AbstractMessageReceiver[] getReceivers(String wildcardExpression)

connect

public void connect()
             throws Exception
Description copied from interface: UMOConnectable
Make the connection to the underlying transport. The fact that this object is connected or not should have no influence on the lifecycle, especially the start / stop state if applicable.

Specified by:
connect in interface UMOConnectable
Throws:
Exception

disconnect

public void disconnect()
                throws Exception
Description copied from interface: UMOConnectable
Disconnect the from the underlying transport

Specified by:
disconnect in interface UMOConnectable
Throws:
Exception

getConnectionDescription

public String getConnectionDescription()
Description copied from interface: UMOConnectable
Returns a string identifying the underlying resource

Specified by:
getConnectionDescription in interface UMOConnectable
Returns:

isConnected

public final boolean isConnected()
Description copied from interface: UMOConnectable
Determines if this object is connected or not

Specified by:
isConnected in interface UMOConnectable
Returns:

doConnect

public void doConnect()
               throws Exception
Template method where any connections should be made for the connector

Throws:
Exception

doDisconnect

public void doDisconnect()
                  throws Exception
Template method where any connected resources used by the connector should be disconnected

Throws:
Exception

getConnectEventId

protected String getConnectEventId()
The resource id used when firing ConnectEvents from this connector

Returns:
the resource id used when firing ConnectEvents from this connector

setCreateDispatcherPerRequest

public void setCreateDispatcherPerRequest(boolean createDispatcherPerRequest)
controls whether dispatchers or cached or created per request Note that if an exception occurs in the Dispatcher it is automatically disposed of and a new one is created for the next request. This allows dispatchers to recover from loss of connection and other faults.

Parameters:
createDispatcherPerRequest - whether a new dispatcher is created for every request or not

isCreateDispatcherPerRequest

public boolean isCreateDispatcherPerRequest()
controls whether dispatchers or cached or created per request Note that if an exception occurs in the Dispatcher it is automatically disposed of and a new one is created for the next request. This allows dispatchers to recover from loss of connection and other faults.

Returns:
true if a anew dispatcher is created for every request

isCreateMultipleTransactedReceivers

public boolean isCreateMultipleTransactedReceivers()
For better throughput when using TransactedMessageReceivers. This will create an number of receiver threads based on the ThreadingProfile configured fro the receiver. This property is user by transports that support transactions, specifically MessageReceivers that extend the TransactedPollingMessageReceiver.

Returns:
true if multiple receiver threads will be created for receivers on this connection

setCreateMultipleTransactedReceivers

public void setCreateMultipleTransactedReceivers(boolean createMultipleTransactedReceivers)
For better throughput when using TransactedMessageReceivers. This will create an number of receiver threads based on the ThreadingProfile configured fro the receiver. This property is user by transports that support transactions, specifically MessageReceivers that extend the TransactedPollingMessageReceiver.

Parameters:
createMultipleTransactedReceivers - true if multiple receiver threads will be created for receivers on this connection

isEnableMessageEvents

public boolean isEnableMessageEvents()
Whether to fire message notifications for every message that is sent or received from this connector


setEnableMessageEvents

public void setEnableMessageEvents(boolean enableMessageEvents)
Whether to fire message notifications for every message that is sent or received from this connector

Parameters:
enableMessageEvents -

registerSupportedProtocol

public void registerSupportedProtocol(String protocol)
Registers other protocols 'understood' by this connector. These must contain scheme meta info. Any protocol registered must begin with the protocol of this connector, i.e. If the connector is axis the protocol for jms over axis will be axis:jms. Here, 'axis' is the scheme meta info and 'jms' is the protocol. If the protocol argument does not start with the connector's protocol, it will be appended.

Parameters:
protocol - the supported protocol to register

registerSupportedProtocolWithotPrefix

protected void registerSupportedProtocolWithotPrefix(String protocol)
Registers other protocols 'understood' by this connector. These must contain scheme meta info. Unlike the registerSupportedProtolcol method, this allows you to register protocols that are not prefixed with the connector protocol. This is useful where you use a Service Finder to discover which Transport implementation to use. For example the 'wsdl' transport is a generic 'finder' transport that will use Axis, Xfire or Glue to create the WSDL client. These transport protocols would be wsdl-axis, wsdl-xfire and wsdl-glue, but they can all support 'wsdl' protocol too.

Parameters:
protocol - the supported protocol to register

unregisterSupportedProtocol

public void unregisterSupportedProtocol(String protocol)

supportsProtocol

public boolean supportsProtocol(String protocol)
Specified by:
supportsProtocol in interface UMOConnector
Returns:
true if the protocol is supported by this connector.

getSupportedProtocols

public List getSupportedProtocols()
Returns an unmodifiable list of the protocols supported by this connector

Returns:
an unmodifiable list of the protocols supported by this connector

setSupportedProtocols

public void setSupportedProtocols(List supportedProtocols)
Sets A list of protocols that the connector can accept

Parameters:
supportedProtocols -

isUseSingleReceiverThreadPool

public boolean isUseSingleReceiverThreadPool()
Should a single receiver thread pool be created for all receivers It is recommended that if you have a lot of receivers being registered per connector that this should be set to true

Returns:
true is a single thread pool is being used for all receivers on this connector

setUseSingleReceiverThreadPool

public void setUseSingleReceiverThreadPool(boolean useSingleReceiverThreadPool)
Should a single dispatcher thread pool be created for all recivers It is recommended that if you have a lot of receivers being registered per connector that this should be set to true

Parameters:
useSingleReceiverThreadPool - true is a single thread pool is being used for all receivers on this connector

isUseSingleDispatcherThreadPool

public boolean isUseSingleDispatcherThreadPool()
Should a single dispatcher thread pool be created for all distachers It is recommended that if you have a lot of dispatcher being created per connector that this should be set to true i.e. many different outbound endpoints

Returns:
true is a single thread pool is being used for all dispatchers on this connector

setUseSingleDispatcherThreadPool

public void setUseSingleDispatcherThreadPool(boolean useSingleDispatcherThreadPool)
Should a single dispatcher thread pool be created for all distachers It is recommended that if you have a lot of dispatcher being created per connector that this should be set to true i.e. many different outbound endpoints

Parameters:
useSingleDispatcherThreadPool - true is a single thread pool is being used for all dispatchers on this connector

isServerSide

public boolean isServerSide()
The flag determines if the connector is being used on the server side or client. If true receiver threads will be given a slightly higher priority.

Returns:
true if running on the server side (default)

setServerSide

public void setServerSide(boolean serverSide)
The flag determines if the connector is being used on the server side or client. If true receiver threads will be given a slightly higher priority.

Parameters:
serverSide - true if running on the server side

getSessionHandler

public UMOSessionHandler getSessionHandler()

setSessionHandler

public void setSessionHandler(UMOSessionHandler sessionHandler)

workAccepted

public void workAccepted(WorkEvent event)

workRejected

public void workRejected(WorkEvent event)

workStarted

public void workStarted(WorkEvent event)

workCompleted

public void workCompleted(WorkEvent event)

handleWorkException

protected void handleWorkException(WorkEvent event,
                                   String type)


Copyright © 2003-2006 MuleSource Inc.. All Rights Reserved.