Class PropertiesEndpointGroup

    • Method Detail

      • of

        public static PropertiesEndpointGroup of​(ClassLoader classLoader,
                                                 String resourceName,
                                                 String endpointKeyPrefix)
        Creates a new EndpointGroup instance that loads the host names (or IP address) and the port numbers of the Endpoint from the resourceName resource file. The resource file must contain at least one property whose name starts with endpointKeyPrefix:
        
         example.hosts.0=example1.com:36462
         example.hosts.1=example2.com:36462
         example.hosts.2=example3.com:36462
         
        Parameters:
        resourceName - the name of the resource where the list of Endpoints is loaded from
        endpointKeyPrefix - the property name prefix
        Throws:
        IllegalArgumentException - if failed to load any hosts from the specified resource file
      • of

        public static PropertiesEndpointGroup of​(ClassLoader classLoader,
                                                 String resourceName,
                                                 String endpointKeyPrefix,
                                                 int defaultPort)
        Creates a new EndpointGroup instance that loads the host names (or IP address) and the port numbers of the Endpoint from the resourceName resource file. The resource file must contain at least one property whose name starts with endpointKeyPrefix:
        
         example.hosts.0=example1.com:36462
         example.hosts.1=example2.com:36462
         example.hosts.2=example3.com:36462
         
        Parameters:
        resourceName - the name of the resource where the list of Endpoints is loaded from
        endpointKeyPrefix - the property name prefix
        defaultPort - the default port number to use
        Throws:
        IllegalArgumentException - if failed to load any hosts from the specified resource file
      • of

        public static PropertiesEndpointGroup of​(Properties properties,
                                                 String endpointKeyPrefix,
                                                 int defaultPort)
        Creates a new EndpointGroup instance that loads the host names (or IP address) and the port numbers of the Endpoint from the Properties. The Properties must contain at least one property whose name starts with endpointKeyPrefix:
        
         example.hosts.0=example1.com:36462
         example.hosts.1=example2.com:36462
         example.hosts.2=example3.com:36462
         
        Parameters:
        properties - the Properties where the list of Endpoints is loaded from
        endpointKeyPrefix - the property name prefix
        defaultPort - the default port number to use
        Throws:
        IllegalArgumentException - if failed to load any hosts from the specified Properties