Class SocketAddress


public class SocketAddress extends ObjectWithJsonToString
  • Constructor Details

    • SocketAddress

      public SocketAddress()
  • Method Details

    • 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
    • getScheme

      public SocketAddress.Scheme getScheme()
    • 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