Class DiscoveryAgentFactory

    • Constructor Detail

      • DiscoveryAgentFactory

        public DiscoveryAgentFactory()
    • Method Detail

      • createDiscoveryAgent

        public abstract DiscoveryAgent createDiscoveryAgent​(java.net.URI remoteURI)
                                                     throws java.lang.Exception
        Creates an instance of the given DiscoveryAgent and configures it using the properties set on the given remote broker URI.
        Parameters:
        remoteURI - The URI used to configure remote discovery.
        Returns:
        a new DiscoveryAgent instance.
        Throws:
        java.lang.Exception - if an error occurs while creating the DiscoveryAgent instance.
      • getName

        public abstract java.lang.String getName()
        Returns:
        the name of this discovery agent, e.g. Multicast, Zeroconf, etc.
      • createAgent

        public static DiscoveryAgent createAgent​(java.net.URI remoteURI)
                                          throws java.lang.Exception
        Static create method that performs the DiscoveryAgent search and handles the configuration and setup.
        Parameters:
        remoteURI - the URI used to configure the discovery mechanism.
        Returns:
        a new DiscoveryAgent instance that is ready for use.
        Throws:
        java.lang.Exception - if an error occurs while creating the DiscoveryAgent instance.
      • findAgentFactory

        protected static DiscoveryAgentFactory findAgentFactory​(java.net.URI location)
                                                         throws java.io.IOException
        Searches for a DiscoveryAgentFactory by using the scheme from the given URI. The search first checks the local cache of discovery agent factories before moving on to search in the classpath.
        Parameters:
        location - The URI whose scheme will be used to locate a DiscoveryAgentFactory.
        Returns:
        a DiscoveryAgentFactory instance matching the URI's scheme.
        Throws:
        java.io.IOException - if an error occurs while locating the factory.