Class PingOptions.Builder

    • Method Detail

      • version

        public PingOptions.Builder version​(@NotNull
                                           @NotNull ProtocolVersion protocolVersion)
        Sets the protocol with which the server is to be pinged.
        Parameters:
        protocolVersion - the specified protocol
        Returns:
        this builder
      • timeout

        public PingOptions.Builder timeout​(@NotNull
                                           @NotNull Duration timeout)
        Sets the maximum time to wait to get the required ServerPing.
        Parameters:
        timeout - the timeout duration A value of 0 means that the read-timeout value from the Velocity configuration will be used, while a negative value means that there will be no timeout.
        Returns:
        this builder
      • timeout

        public PingOptions.Builder timeout​(long time,
                                           @NotNull
                                           @NotNull TimeUnit timeunit)
        Sets the maximum time to wait to get the required ServerPing.
        Parameters:
        time - the timeout duration A value of 0 means that the read-timeout value from the Velocity configuration will be used, while a negative value means that there will be no timeout.
        timeunit - the unit of time to be used to provide the timeout duration
        Returns:
        this builder