Class AbstractDetector

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractDetector​(java.lang.String serviceName, int port)
      Constructor for AbstractDetector.
      protected AbstractDetector​(java.lang.String serviceName, int port, int timeout, int retries)
      Constructor for AbstractDetector.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void dispose()
      dispose
      java.lang.String getIpMatch()
      getIpMatch
      int getPort()
      getPort
      int getRetries()
      getRetries
      java.lang.String getServiceName()
      getServiceName
      int getTimeout()
      getTimeout
      void init()
      init
      protected abstract void onInit()
      onInit
      void setIpMatch​(java.lang.String ipMatch)
      Set the IPLIKE rule for detecting the service.
      void setPort​(int port)
      setPort
      void setRetries​(int retries)
      setRetries
      void setServiceName​(java.lang.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.
      void setTimeout​(int timeout)
      setTimeout
      • Methods inherited from class java.lang.Object

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

      • AbstractDetector

        protected AbstractDetector​(java.lang.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​(java.lang.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​(java.lang.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.
      • getServiceName

        public final java.lang.String getServiceName()

        getServiceName

        Specified by:
        getServiceName in interface ServiceDetector
        Returns:
        a String object.
      • getIpMatch

        public java.lang.String getIpMatch()

        getIpMatch

        Specified by:
        getIpMatch in interface ServiceDetector
        Returns:
        a String object.
      • setIpMatch

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