Class SocketAddress

    • Constructor Detail

      • SocketAddress

        public SocketAddress()
    • Method Detail

      • socketAddress

        public static SocketAddress socketAddress()
        Static builder to create a socketAddress.
      • getHost

        public String getHost()
      • withHost

        public SocketAddress withHost​(String host)
        The host or ip address to use when connecting to the socket to i.e. "www.mock-server.com"
        Parameters:
        host - a hostname or ip address as a string
      • getPort

        public Integer getPort()
      • withPort

        public SocketAddress withPort​(Integer port)
        The port to use when connecting to the socket i.e. 80. If not specified the port defaults to 80.
        Parameters:
        port - a port as an integer
      • withScheme

        public SocketAddress withScheme​(SocketAddress.Scheme scheme)
        The scheme to use when connecting to the socket, either HTTP or HTTPS. If not specified the scheme defaults to HTTP.
        Parameters:
        scheme - the scheme as a SocketAddress.Scheme value