org.mule.providers.service
Class TransportFactory

java.lang.Object
  extended by org.mule.providers.service.TransportFactory

public final class TransportFactory
extends Object

TransportFactory can be used for generically creating endpoints from an url. Note that for some endpoints, the url alone is not enough to create the endpoint if a connector for the endpoint has not already been configured with the Mule Manager.


Field Summary
static int ALWAYS_CREATE_CONNECTOR
           
static int GET_OR_CREATE_CONNECTOR
           
protected static Log logger
          logger used by this class
static int NEVER_CREATE_CONNECTOR
           
static String PROVIDER_SERVICES_PATH
           
static int USE_CONNECTOR
           
 
Method Summary
static UMOConnector createConnector(UMOEndpointURI url)
          Creates an uninitialied connector from the provided MuleEndpointURI.
static UMOEndpoint createEndpoint(UMOEndpointURI uri, String type)
           
static UMOConnector getConnectorByProtocol(String protocol)
           
static UMOConnector getOrCreateConnectorByProtocol(UMOEndpointURI uri)
           
static UMOConnector getOrCreateConnectorByProtocol(UMOImmutableEndpoint endpoint)
           
static TransportServiceDescriptor getServiceDescriptor(String protocol)
           
static TransportServiceDescriptor getServiceDescriptor(String protocol, Properties overrides)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER_SERVICES_PATH

public static final String PROVIDER_SERVICES_PATH
See Also:
Constant Field Values

logger

protected static final Log logger
logger used by this class


GET_OR_CREATE_CONNECTOR

public static final int GET_OR_CREATE_CONNECTOR
See Also:
Constant Field Values

ALWAYS_CREATE_CONNECTOR

public static final int ALWAYS_CREATE_CONNECTOR
See Also:
Constant Field Values

NEVER_CREATE_CONNECTOR

public static final int NEVER_CREATE_CONNECTOR
See Also:
Constant Field Values

USE_CONNECTOR

public static final int USE_CONNECTOR
See Also:
Constant Field Values
Method Detail

createEndpoint

public static UMOEndpoint createEndpoint(UMOEndpointURI uri,
                                         String type)
                                  throws EndpointException
Throws:
EndpointException

createConnector

public static UMOConnector createConnector(UMOEndpointURI url)
                                    throws TransportFactoryException
Creates an uninitialied connector from the provided MuleEndpointURI. The scheme is used to determine what kind of connector to create. Any params set on the uri can be used to initialise bean properties on the created connector.

Note that the initalise method will need to be called on the connector returned. This is so that developers can control when the connector initialisation takes place as this is likely to initialse all connecotr resources.

Parameters:
url - the MuleEndpointURI url to create the connector with
Returns:
a new Connector
Throws:
TransportFactoryException

getServiceDescriptor

public static TransportServiceDescriptor getServiceDescriptor(String protocol)
                                                       throws TransportFactoryException
Throws:
TransportFactoryException

getServiceDescriptor

public static TransportServiceDescriptor getServiceDescriptor(String protocol,
                                                              Properties overrides)
                                                       throws TransportFactoryException
Throws:
TransportFactoryException

getOrCreateConnectorByProtocol

public static UMOConnector getOrCreateConnectorByProtocol(UMOEndpointURI uri)
                                                   throws TransportFactoryException
Throws:
TransportFactoryException

getOrCreateConnectorByProtocol

public static UMOConnector getOrCreateConnectorByProtocol(UMOImmutableEndpoint endpoint)
                                                   throws TransportFactoryException
Throws:
TransportFactoryException

getConnectorByProtocol

public static UMOConnector getConnectorByProtocol(String protocol)


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