Class AbstractDetector

    • Constructor Detail

      • AbstractDetector

        protected AbstractDetector​(String serviceName,
                                   int port,
                                   int timeout,
                                   int retries)

        Constructor for AbstractDetector.

        Parameters:
        serviceName - a String object.
        port - a int.
        timeout - a int.
        retries - a int.
      • AbstractDetector

        protected AbstractDetector​(String serviceName,
                                   int port)

        Constructor for AbstractDetector.

        Parameters:
        serviceName - a String object.
        port - a int.
    • Method Detail

      • onInit

        protected abstract void onInit()

        onInit

      • setPort

        public final void setPort​(int port)

        setPort

        Specified by:
        setPort in interface ServiceDetector
        Parameters:
        port - a int.
      • getPort

        public final int getPort()

        getPort

        Specified by:
        getPort in interface ServiceDetector
        Returns:
        a int.
      • setRetries

        public void setRetries​(int retries)

        setRetries

        Parameters:
        retries - a int.
      • getRetries

        public int getRetries()

        getRetries

        Returns:
        a int.
      • setTimeout

        public final void setTimeout​(int timeout)

        setTimeout

        Specified by:
        setTimeout in interface ServiceDetector
        Parameters:
        timeout - a int.
      • getTimeout

        public final int getTimeout()

        getTimeout

        Specified by:
        getTimeout in interface ServiceDetector
        Returns:
        a int.
      • setServiceName

        public final void setServiceName​(String serviceName)
        Service name is mutable so that we can create new instances of each implementation and define a new service detector using the underlying protocol.
        Specified by:
        setServiceName in interface ServiceDetector
        Parameters:
        serviceName - a String object.
      • setIpMatch

        public void setIpMatch​(String ipMatch)
        Set the IPLIKE rule for detecting the service.
        Specified by:
        setIpMatch in interface ServiceDetector