Package org.apache.qpid.jms.provider
Class ProviderFactory
- java.lang.Object
-
- org.apache.qpid.jms.provider.ProviderFactory
-
- Direct Known Subclasses:
AmqpProviderFactory,FailoverProviderFactory
public abstract class ProviderFactory extends java.lang.ObjectInterface that all JMS Providers must implement.
-
-
Constructor Summary
Constructors Constructor Description ProviderFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Providercreate(java.net.URI remoteURI)Static create method that performs the ProviderFactory search and handles the configuration and setup.static Providercreate(java.net.URI remoteURI, ProviderFutureFactory futureFactory)Static create method that performs the ProviderFactory search and handles the configuration and setup.abstract ProvidercreateProvider(java.net.URI remoteURI)Creates an instance of the given AsyncProvider and configures it using the properties set on the given remote broker URI.abstract ProvidercreateProvider(java.net.URI remoteURI, ProviderFutureFactory futureFactory)Creates an instance of the given AsyncProvider and configures it using the properties set on the given remote broker URI.static ProviderFactoryfindProviderFactory(java.lang.String scheme)Searches for a ProviderFactory by using the scheme given.static ProviderFactoryfindProviderFactory(java.net.URI location)Searches for a ProviderFactory by using the scheme from the given URI.abstract java.lang.StringgetName()
-
-
-
Method Detail
-
createProvider
public abstract Provider createProvider(java.net.URI remoteURI) throws java.lang.Exception
Creates an instance of the given AsyncProvider and configures it using the properties set on the given remote broker URI.- Parameters:
remoteURI- The URI used to connect to a remote Broker.- Returns:
- a new AsyncProvider instance.
- Throws:
java.lang.Exception- if an error occurs while creating the Provider instance.
-
createProvider
public abstract Provider createProvider(java.net.URI remoteURI, ProviderFutureFactory futureFactory) throws java.lang.Exception
Creates an instance of the given AsyncProvider and configures it using the properties set on the given remote broker URI.- Parameters:
remoteURI- The URI used to connect to a remote Broker.futureFactory- TheProviderFutureFactoryto use when creating the newProvider.- Returns:
- a new AsyncProvider instance.
- Throws:
java.lang.Exception- if an error occurs while creating the Provider instance.
-
getName
public abstract java.lang.String getName()
- Returns:
- the name of this Provider.
-
create
public static Provider create(java.net.URI remoteURI) throws java.lang.Exception
Static create method that performs the ProviderFactory search and handles the configuration and setup.- Parameters:
remoteURI- the URI of the remote peer.- Returns:
- a new AsyncProvider instance that is ready for use.
- Throws:
java.lang.Exception- if an error occurs while creating the AsyncProvider instance.
-
create
public static Provider create(java.net.URI remoteURI, ProviderFutureFactory futureFactory) throws java.lang.Exception
Static create method that performs the ProviderFactory search and handles the configuration and setup.- Parameters:
remoteURI- the URI of the remote peer.futureFactory- theProviderFutureFactoryto use when building the newProvider.- Returns:
- a new AsyncProvider instance that is ready for use.
- Throws:
java.lang.Exception- if an error occurs while creating the AsyncProvider instance.
-
findProviderFactory
public static ProviderFactory findProviderFactory(java.net.URI location) throws java.io.IOException
Searches for a ProviderFactory by using the scheme from the given URI. The search first checks the local cache of provider factories before moving on to search in the class path.- Parameters:
location- The URI whose scheme will be used to locate a ProviderFactory.- Returns:
- a provider factory instance matching the URI's scheme.
- Throws:
java.io.IOException- if an error occurs while locating the factory.
-
findProviderFactory
public static ProviderFactory findProviderFactory(java.lang.String scheme) throws java.io.IOException
Searches for a ProviderFactory by using the scheme given. The search first checks the local cache of provider factories before moving on to search in the class path.- Parameters:
scheme- The URI scheme that describes the desired factory.- Returns:
- a provider factory instance matching the scheme.
- Throws:
java.io.IOException- if an error occurs while locating the factory.
-
-