org.mule.transport.service
Class TransportFactory

java.lang.Object
  extended by org.mule.transport.service.TransportFactory
Direct Known Subclasses:
ConfigurableTransportFactory

public 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
protected static Log logger
          logger used by this class
protected  MuleContext muleContext
           
 
Constructor Summary
TransportFactory(MuleContext muleContext)
           
 
Method Summary
 Connector createConnector(EndpointURI url)
          Creates an uninitialied connector from the provided MuleEndpointURI.
 Connector createConnector(String uri)
           
 Connector getConnectorByProtocol(String protocol)
           
 Connector getDefaultConnectorByProtocol(String protocol)
           
 Connector getOrCreateConnectorByProtocol(EndpointURI uri)
          Returns an initialized connector.
 Connector getOrCreateConnectorByProtocol(ImmutableEndpoint endpoint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
logger used by this class


muleContext

protected MuleContext muleContext
Constructor Detail

TransportFactory

public TransportFactory(MuleContext muleContext)
Method Detail

createConnector

public Connector createConnector(EndpointURI 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

createConnector

public Connector createConnector(String uri)
                          throws TransportFactoryException
Throws:
TransportFactoryException

getOrCreateConnectorByProtocol

public Connector getOrCreateConnectorByProtocol(ImmutableEndpoint endpoint)
                                         throws TransportFactoryException
Throws:
TransportFactoryException

getOrCreateConnectorByProtocol

public Connector getOrCreateConnectorByProtocol(EndpointURI uri)
                                         throws TransportFactoryException
Returns an initialized connector.

Throws:
TransportFactoryException

getConnectorByProtocol

public Connector getConnectorByProtocol(String protocol)

getDefaultConnectorByProtocol

public Connector getDefaultConnectorByProtocol(String protocol)


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.