Class IPPollRange

    • Constructor Detail

      • IPPollRange

        public IPPollRange​(String foreignSource,
                           String location,
                           String fromIP,
                           String toIP,
                           long timeout,
                           int retries)
                    throws UnknownHostException

        Creates an IPPollRange object that can be used to generate IPPollAddress objects. The addresses are encapsulated by the range object and the values of timeout and retry are set in each generated IPPollAddress object.

        Parameters:
        fromIP - The start of the address range to cycle over.
        toIP - The end of the address range to cycle over.
        timeout - The timeout for each generated IPPollAddress.
        retries - The number of retries for generated addresses.
        Throws:
        UnknownHostException - if any.
        See Also:
        IPPollAddress, IPAddrRange
      • IPPollRange

        public IPPollRange​(String foreignSource,
                           String location,
                           InetAddress start,
                           InetAddress end,
                           long timeout,
                           int retries)

        Creates an IPPollRange object that can be used to generate IPPollAddress objects. The addresses are encapsulated by the range [start..end] and the values of timeout and retry are set in each generated IPPollAddress object.

        Parameters:
        start - The start of the address range to cycle over.
        end - The end of the address range to cycle over.
        timeout - The timeout for each generated IPPollAddress.
        retries - The number of retries for generated addresses.
        See Also:
        IPPollAddress, IPAddrRange
    • Method Detail

      • getForeignSource

        public String getForeignSource()
        Foreign source where this address should be persisted.
      • getLocation

        public String getLocation()
        Network location of this address.
      • getTimeout

        public long getTimeout()

        Returns the timeout set for the object. The timeout should be in 1/1000th of a second increments.

        Returns:
        a long.
      • getRetries

        public int getRetries()

        Returns the retry count for the object.

        Returns:
        a int.
      • getAddressRange

        public IPAddrRange getAddressRange()

        Returns the configured address ranges that are encapsulated by this object.

        Returns:
        a IPAddrRange object.
      • elements

        public Enumeration<IPPollAddress> elements()

        Returns an Enumeration that can be used to cycle over the range of pollable addresses.

        Returns:
        a Enumeration object.