Class ClientParameters.Builder<T extends ClientParameters.Builder<T>>

    • Constructor Detail

      • Builder

        public Builder()
        Creates a builder for configuring client parameters.
    • Method Detail

      • withRemoteAddress

        public T withRemoteAddress​(InetSocketAddress remoteAddress)
        Sets the remote address to which the client will connect.
        Parameters:
        remoteAddress - the remote socket address.
        Returns:
        this builder.
        Throws:
        IllegalArgumentException - if remoteAddress is null.
      • withRemoteAddress

        public T withRemoteAddress​(String host,
                                   int port)
        Sets the remote address using the specified host and port.
        Parameters:
        host - the remote host name or IP address.
        port - the remote port, from 0 through 65535.
        Returns:
        this builder.
        Throws:
        IllegalArgumentException - if host is null, or if port is outside the range 0 through 65535.
      • withRemoteAddress

        public T withRemoteAddress​(InetAddress address,
                                   int port)
        Sets the remote address using the specified network address and port.
        Parameters:
        address - the remote network address.
        port - the remote port, from 0 through 65535.
        Returns:
        this builder.
        Throws:
        IllegalArgumentException - if address is null, or if port is outside the range 0 through 65535.
      • withRemoteAddress

        public T withRemoteAddress​(int port)
        Sets the remote address to the local loopback address using the specified port.
        Parameters:
        port - the remote port, from 0 through 65535.
        Returns:
        this builder.
        Throws:
        IllegalArgumentException - if port is outside the range 0 through 65535.
      • withSendSyncTimeout

        public T withSendSyncTimeout​(long replyWaitTime)
        Sets the amount of time a synchronous send waits for a reply before timing out.
        Parameters:
        replyWaitTime - the synchronous reply timeout in milliseconds.
        Returns:
        this builder.
        Throws:
        IllegalArgumentException - if replyWaitTime is less than 0.