Package org.apache.qpid.jms.provider
Class ProviderFactory
java.lang.Object
org.apache.qpid.jms.provider.ProviderFactory
- Direct Known Subclasses:
AmqpProviderFactory,FailoverProviderFactory
Interface that all JMS Providers must implement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProviderStatic create method that performs the ProviderFactory search and handles the configuration and setup.static Providercreate(URI remoteURI, ProviderFutureFactory futureFactory) Static create method that performs the ProviderFactory search and handles the configuration and setup.abstract ProvidercreateProvider(URI remoteURI) Creates an instance of the given AsyncProvider and configures it using the properties set on the given remote broker URI.abstract ProvidercreateProvider(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(String scheme) Searches for a ProviderFactory by using the scheme given.static ProviderFactoryfindProviderFactory(URI location) Searches for a ProviderFactory by using the scheme from the given URI.abstract StringgetName()
-
Constructor Details
-
ProviderFactory
public ProviderFactory()
-
-
Method Details
-
createProvider
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:
Exception- if an error occurs while creating the Provider instance.
-
createProvider
public abstract Provider createProvider(URI remoteURI, ProviderFutureFactory futureFactory) throws 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:
Exception- if an error occurs while creating the Provider instance.
-
getName
- Returns:
- the name of this Provider.
-
create
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:
Exception- if an error occurs while creating the AsyncProvider instance.
-
create
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:
Exception- if an error occurs while creating the AsyncProvider instance.
-
findProviderFactory
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:
IOException- if an error occurs while locating the factory.
-
findProviderFactory
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:
IOException- if an error occurs while locating the factory.
-