Package net.officefloor.server.http
Interface HttpServerLocation
-
- All Known Implementing Classes:
HttpServerLocationImpl,MockHttpServer,MockWoofServer,MockWoofServerExtension,MockWoofServerRule
public interface HttpServerLocationLocation of the HTTP server.
Note the
Propertyconfiguration is provided here to aid identifying how to configure common settings for theHttpServer. Configuration is expected to follow:- checking the
SourceContext - checking
System.getProperty(String) - using defaults
- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_CLUSTER_HOST_NAMEName ofPropertyfor the cluster host name.static java.lang.StringPROPERTY_CLUSTER_HTTP_PORTName ofPropertyfor the cluster HTTP port.static java.lang.StringPROPERTY_CLUSTER_HTTPS_PORTName ofPropertyfor the cluster HTTPS port.static java.lang.StringPROPERTY_DOMAINName ofPropertyfor the domain.static java.lang.StringPROPERTY_HTTP_PORTName ofPropertyfor the HTTP port.static java.lang.StringPROPERTY_HTTPS_PORTName ofPropertyfor the HTTPS port.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringcreateClientUrl(boolean isSecure, java.lang.String path)Creates the client URL to call theHttpServer.java.lang.StringgetClusterHostName()Obtains the name of the host for the server within the cluster.intgetClusterHttpPort()The cluster may be behind a load balancer and the server may be running on a different port than expected by the client.intgetClusterHttpsPort()The cluster may be behind a load balancer and the server may be running on a different port than expected by the client.java.lang.StringgetDomain()Obtains the domain for the server.intgetHttpPort()Obtains the HTTP port.intgetHttpsPort()Obtains the HTTPS port.
-
-
-
Field Detail
-
PROPERTY_DOMAIN
static final java.lang.String PROPERTY_DOMAIN
Name ofPropertyfor the domain.- See Also:
- Constant Field Values
-
PROPERTY_HTTP_PORT
static final java.lang.String PROPERTY_HTTP_PORT
Name ofPropertyfor the HTTP port.- See Also:
- Constant Field Values
-
PROPERTY_HTTPS_PORT
static final java.lang.String PROPERTY_HTTPS_PORT
Name ofPropertyfor the HTTPS port.- See Also:
- Constant Field Values
-
PROPERTY_CLUSTER_HOST_NAME
static final java.lang.String PROPERTY_CLUSTER_HOST_NAME
Name ofPropertyfor the cluster host name.- See Also:
- Constant Field Values
-
PROPERTY_CLUSTER_HTTP_PORT
static final java.lang.String PROPERTY_CLUSTER_HTTP_PORT
Name ofPropertyfor the cluster HTTP port.- See Also:
- Constant Field Values
-
PROPERTY_CLUSTER_HTTPS_PORT
static final java.lang.String PROPERTY_CLUSTER_HTTPS_PORT
Name ofPropertyfor the cluster HTTPS port.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDomain
java.lang.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
java.lang.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
java.lang.String createClientUrl(boolean isSecure, java.lang.String path)Creates the client URL to call theHttpServer.- Parameters:
isSecure- If secure URL.path- Path including query string and fragment.- Returns:
- URL for the client to call on the
HttpServer.
-
-