org.mule.providers
Class AbstractServiceEnabledConnector

java.lang.Object
  extended byorg.mule.providers.AbstractConnector
      extended byorg.mule.providers.AbstractServiceEnabledConnector
All Implemented Interfaces:
Disposable, ExceptionListener, Initialisable, UMOConnectable, UMOConnector
Direct Known Subclasses:
AbstractJndiConnector, AxisConnector, DQConnector, FileConnector, FtpConnector, GlueConnector, JbiConnector, JdbcConnector, JmsConnector, Pop3Connector, QuartzConnector, ServletConnector, SmtpConnector, SpaceConnector, StreamConnector, TcpConnector, UdpConnector, VMConnector, XFireConnector, XmppConnector

public abstract class AbstractServiceEnabledConnector
extends AbstractConnector

AbstractServiceEnabledConnector initialises a connector from a service descriptor. Using this method greatly reduces the code required to implement a connector and means that Mule can create connectors and endpoints from a url if the connector has a service descriptor.

Version:
$Revision: 3798 $
Author:
Ross Mason
See Also:
ConnectorServiceDescriptor

Field Summary
protected  ConnectorServiceDescriptor serviceDescriptor
          Holds the service configuration for this connector
protected  Properties serviceOverrides
           
 
Fields inherited from class org.mule.providers.AbstractConnector
connected, connecting, createDispatcherPerRequest, createMultipleTransactedReceivers, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, name, receivers, serverSide, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
AbstractServiceEnabledConnector()
           
 
Method Summary
 UMOMessageReceiver createReceiver(UMOComponent component, UMOEndpoint endpoint)
           
 void doInitialise()
           
 UMOMessageAdapter getMessageAdapter(Object message)
          Gets a UMOMessageAdapter for the endpoint for the given message (data)
protected  ConnectorServiceDescriptor getServiceDescriptor()
           
 Map getServiceOverrides()
           
 UMOStreamMessageAdapter getStreamMessageAdapter(InputStream in, OutputStream out)
          Gets a UMOStreamMessageAdapter from the connector for the given message.
protected  void initFromServiceDescriptor()
           
 void initialiseFromUrl(UMOEndpointURI endpointUri)
           
 void setServiceOverrides(Map serviceOverrides)
           
 
Methods inherited from class org.mule.providers.AbstractConnector
checkDisposed, connect, createDispatcher, destroyReceiver, disconnect, dispose, disposeDispatchers, disposeReceivers, doConnect, doDisconnect, doDispose, doStart, doStop, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcher, getDispatcher, getDispatcherFactory, getDispatchers, getDispatcherThreadingProfile, getExceptionListener, getName, getProtocol, getReceiver, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReplyToHandler, getSessionHandler, getSupportedProtocols, handleException, handleWorkException, initialise, isConnected, isCreateDispatcherPerRequest, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isServerSide, isStarted, isUseSingleDispatcherThreadPool, isUseSingleReceiverThreadPool, lookupDispatcher, lookupReceiver, registerListener, registerSupportedProtocol, registerSupportedProtocolWithotPrefix, setConnectionStrategy, setCreateDispatcherPerRequest, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setName, setReceiverThreadingProfile, setServerSide, setSessionHandler, setSupportedProtocols, setUseSingleDispatcherThreadPool, setUseSingleReceiverThreadPool, startConnector, stopConnector, supportsProtocol, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceDescriptor

protected ConnectorServiceDescriptor serviceDescriptor
Holds the service configuration for this connector


serviceOverrides

protected Properties serviceOverrides
Constructor Detail

AbstractServiceEnabledConnector

public AbstractServiceEnabledConnector()
Method Detail

doInitialise

public void doInitialise()
                  throws InitialisationException
Overrides:
doInitialise in class AbstractConnector
Throws:
InitialisationException

initialiseFromUrl

public void initialiseFromUrl(UMOEndpointURI endpointUri)
                       throws InitialisationException
Throws:
InitialisationException

initFromServiceDescriptor

protected void initFromServiceDescriptor()
                                  throws InitialisationException
Throws:
InitialisationException

getServiceDescriptor

protected ConnectorServiceDescriptor getServiceDescriptor()

createReceiver

public UMOMessageReceiver createReceiver(UMOComponent component,
                                         UMOEndpoint endpoint)
                                  throws Exception
Specified by:
createReceiver in class AbstractConnector
Throws:
Exception

getMessageAdapter

public UMOMessageAdapter getMessageAdapter(Object message)
                                    throws MessagingException
Gets a UMOMessageAdapter for the endpoint for the given message (data)

Parameters:
message - the data with which to initialise the UMOMessageAdapter
Returns:
the UMOMessageAdapter for the endpoint
Throws:
MessagingException - if the message parameter is not supported
See Also:
UMOMessageAdapter

getStreamMessageAdapter

public UMOStreamMessageAdapter getStreamMessageAdapter(InputStream in,
                                                       OutputStream out)
                                                throws MessagingException
Description copied from interface: UMOConnector
Gets a UMOStreamMessageAdapter from the connector for the given message. This Adapter will correctly handle data streaming for this type of connector

Parameters:
in - the input stream to read the data from
out - the outputStream to write data to. This can be null.
Returns:
the UMOStreamMessageAdapter for the endpoint
Throws:
MessagingException - if the message parameter is not supported
See Also:
UMOStreamMessageAdapter

getServiceOverrides

public Map getServiceOverrides()

setServiceOverrides

public void setServiceOverrides(Map serviceOverrides)


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