Class ProviderFactory

    • Constructor Summary

      Constructors 
      Constructor Description
      ProviderFactory()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static Provider create​(java.net.URI remoteURI)
      Static create method that performs the ProviderFactory search and handles the configuration and setup.
      static Provider create​(java.net.URI remoteURI, ProviderFutureFactory futureFactory)
      Static create method that performs the ProviderFactory search and handles the configuration and setup.
      abstract Provider createProvider​(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 Provider createProvider​(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 ProviderFactory findProviderFactory​(java.lang.String scheme)
      Searches for a ProviderFactory by using the scheme given.
      static ProviderFactory findProviderFactory​(java.net.URI location)
      Searches for a ProviderFactory by using the scheme from the given URI.
      abstract java.lang.String getName()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProviderFactory

        public ProviderFactory()
    • 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 - The ProviderFutureFactory to use when creating the new Provider.
        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 - the ProviderFutureFactory to use when building the new Provider.
        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.