Class PortUtils.ConnectionCheck

  • Enclosing class:
    PortUtils

    @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
    public static class PortUtils.ConnectionCheck
    extends Object
    • Method Detail

      • withRetries

        public PortUtils.ConnectionCheck withRetries​(int numberOfRetries)
        Sets the number of retries, such that execute() will try once more than this. If this is not set then a default of 10 will be used.
        Parameters:
        numberOfRetries - Number of retries. Negative values will be treated as zero.
        Returns:
        this
      • withEveryRetryWaitFor

        public PortUtils.ConnectionCheck withEveryRetryWaitFor​(int time,
                                                               TimeUnit units)
        Sets the delay between tries. If this is not set then a default of 2 seconds will be used.
        Parameters:
        time - The lengthy of time.
        units - The units of that length.
        Returns:
        this
      • executeOnce

        public boolean executeOnce()
        Returns:
        true if socket opened successfully, false otherwise