Class HealthCheck
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.waas.model.HealthCheck
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20181116") public final class HealthCheck extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Health checks monitor the status of your origin servers and only route traffic to the origins that pass the health check.If the health check fails, origin is automatically removed from the load balancing. There is roughly one health check per EDGE POP per period. Any checks that pass will be reported as “healthy”.
Note: Objects should always be created or deserialized using theHealthCheck.Builder
. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theHealthCheck.Builder
, which maintain a set of all explicitly set fields calledHealthCheck.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HealthCheck.Builder
static class
HealthCheck.ExpectedResponseCodeGroup
static class
HealthCheck.Method
An HTTP verb (i.e.
-
Constructor Summary
Constructors Constructor Description HealthCheck(Boolean isEnabled, HealthCheck.Method method, String path, Map<String,String> headers, List<HealthCheck.ExpectedResponseCodeGroup> expectedResponseCodeGroup, Boolean isResponseTextCheckEnabled, String expectedResponseText, Integer intervalInSeconds, Integer timeoutInSeconds, Integer healthyThreshold, Integer unhealthyThreshold)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HealthCheck.Builder
builder()
Create a new builder.boolean
equals(Object o)
List<HealthCheck.ExpectedResponseCodeGroup>
getExpectedResponseCodeGroup()
The HTTP response codes that signify a healthy state.String
getExpectedResponseText()
Health check will search for the given text in a case-sensitive manner within the response body and will fail if the text is not found.Map<String,String>
getHeaders()
HTTP header fields to include in health check requests, expressed as “name”: “value” properties.Integer
getHealthyThreshold()
Number of successful health checks after which the server is marked up.Integer
getIntervalInSeconds()
Time between health checks of an individual origin server, in seconds.Boolean
getIsEnabled()
Enables or disables the health checks.Boolean
getIsResponseTextCheckEnabled()
Enables or disables additional check for predefined text in addition to response code.HealthCheck.Method
getMethod()
An HTTP verb (i.e.String
getPath()
Path to visit on your origins when performing the health check.Integer
getTimeoutInSeconds()
Response timeout represents wait time until request is considered failed, in seconds.Integer
getUnhealthyThreshold()
Number of failed health checks after which the server is marked down.int
hashCode()
HealthCheck.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
HealthCheck
@Deprecated @ConstructorProperties({"isEnabled","method","path","headers","expectedResponseCodeGroup","isResponseTextCheckEnabled","expectedResponseText","intervalInSeconds","timeoutInSeconds","healthyThreshold","unhealthyThreshold"}) public HealthCheck(Boolean isEnabled, HealthCheck.Method method, String path, Map<String,String> headers, List<HealthCheck.ExpectedResponseCodeGroup> expectedResponseCodeGroup, Boolean isResponseTextCheckEnabled, String expectedResponseText, Integer intervalInSeconds, Integer timeoutInSeconds, Integer healthyThreshold, Integer unhealthyThreshold)
Deprecated.
-
-
Method Detail
-
builder
public static HealthCheck.Builder builder()
Create a new builder.
-
toBuilder
public HealthCheck.Builder toBuilder()
-
getIsEnabled
public Boolean getIsEnabled()
Enables or disables the health checks.- Returns:
- the value
-
getMethod
public HealthCheck.Method getMethod()
An HTTP verb (i.e.HEAD, GET, or POST) to use when performing the health check.
- Returns:
- the value
-
getPath
public String getPath()
Path to visit on your origins when performing the health check.- Returns:
- the value
-
getHeaders
public Map<String,String> getHeaders()
HTTP header fields to include in health check requests, expressed as “name”: “value” properties.Because HTTP header field names are case-insensitive, any use of names that are case-insensitive equal to other names will be rejected. If Host is not specified, requests will include a Host header field with value matching the policy’s protected domain. If User-Agent is not specified, requests will include a User-Agent header field with value “waf health checks”.
*Note:** The only currently-supported header fields are Host and User-Agent.
- Returns:
- the value
-
getExpectedResponseCodeGroup
public List<HealthCheck.ExpectedResponseCodeGroup> getExpectedResponseCodeGroup()
The HTTP response codes that signify a healthy state.- 2XX: Success response code group.
- 3XX: Redirection response code group. - 4XX: Client errors response code group. - 5XX: Server errors response code group.
- Returns:
- the value
-
getIsResponseTextCheckEnabled
public Boolean getIsResponseTextCheckEnabled()
Enables or disables additional check for predefined text in addition to response code.- Returns:
- the value
-
getExpectedResponseText
public String getExpectedResponseText()
Health check will search for the given text in a case-sensitive manner within the response body and will fail if the text is not found.- Returns:
- the value
-
getIntervalInSeconds
public Integer getIntervalInSeconds()
Time between health checks of an individual origin server, in seconds.- Returns:
- the value
-
getTimeoutInSeconds
public Integer getTimeoutInSeconds()
Response timeout represents wait time until request is considered failed, in seconds.- Returns:
- the value
-
getHealthyThreshold
public Integer getHealthyThreshold()
Number of successful health checks after which the server is marked up.- Returns:
- the value
-
getUnhealthyThreshold
public Integer getUnhealthyThreshold()
Number of failed health checks after which the server is marked down.- Returns:
- the value
-
toString
public String toString()
- Overrides:
toString
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Parameters:
includeByteArrayContents
- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-