Interface HttpServerLocation

All Known Implementing Classes:
HttpServerLocationImpl, MockHttpServer, MockWoofServer, MockWoofServerExtension, MockWoofServerRule

public interface HttpServerLocation

Location of the HTTP server.

Note the Property configuration is provided here to aid identifying how to configure common settings for the HttpServer. Configuration is expected to follow:

  1. checking the SourceContext
  2. checking System.getProperty(String)
  3. using defaults
Author:
Daniel Sagenschneider
  • Field Details

  • Method Details

    • getDomain

      String getDomain()

      Obtains the domain for the server.

      This is as the client will see the server.

      Returns:
      Domain for the server.
    • getHttpPort

      int getHttpPort()

      Obtains the HTTP port.

      This is as the client will see the server.

      Returns:
      HTTP port.
    • getHttpsPort

      int getHttpsPort()

      Obtains the HTTPS port.

      This is as the client will see the server.

      Returns:
      HTTPS port.
    • getClusterHostName

      String getClusterHostName()
      Obtains the name of the host for the server within the cluster. This name should be understood by all nodes within the cluster.
      Returns:
      Name of the host within the cluster.
    • getClusterHttpPort

      int getClusterHttpPort()
      The cluster may be behind a load balancer and the server may be running on a different port than expected by the client.
      Returns:
      Actual port on the cluster host the server is running on.
    • getClusterHttpsPort

      int getClusterHttpsPort()
      The cluster may be behind a load balancer and the server may be running on a different port than expected by the client.
      Returns:
      Actual secure port on the cluster host the server is running on.
    • createClientUrl

      String createClientUrl(boolean isSecure, String path)
      Creates the client URL to call the HttpServer.
      Parameters:
      isSecure - If secure URL.
      path - Path including query string and fragment.
      Returns:
      URL for the client to call on the HttpServer.