Clients -
http :
FailoverClient
An HTTP client endpoint which provides failover support over multiple HTTP clients.
Constructor
__init
(FailoverClientConfiguration failoverClientConfig)
- failoverClientConfig FailoverClientConfiguration
-
The configurations of the client endpoint associated with this
Failover
instance.
Remote Methods
post | The POST remote function implementation of the Failover Connector. |
head | The HEAD remote function implementation of the Failover Connector. |
patch | The PATCH remote function implementation of the Failover Connector. |
put | The PUT remote function implementation of the Failover Connector. |
options | The OPTIONS remote function implementation of the Failover Connector. |
forward | Invokes an HTTP call using the incoming request's HTTP method. |
execute | Invokes an HTTP call with the specified HTTP method. |
delete | The DELETE remote function implementation of the Failover Connector. |
get | The GET remote function implementation of the Failover Connector. |
submit | Submits an HTTP request to a service with the specified HTTP verb. The FailoverClient.submit() function does not
return an http:Response as the result. Rather it returns an http:HttpFuture which can be used for subsequent interactions
with the HTTP endpoint.
|
getResponse | Retrieves the http:Response for a previously-submitted request.
|
hasPromise | Checks whether an http:PushPromise exists for a previously-submitted request.
|
getNextPromise | Retrieves the next available http:PushPromise for a previously-submitted request.
|
getPromisedResponse | Retrieves the promised server push http:Response message.
|
rejectPromise | Rejects an http:PushPromise . When an http:PushPromise is rejected, there is no chance of fetching a promised
response using the rejected promise.
|
Fields
- failoverClientConfig FailoverClientConfiguration
-
The configurations for the failover client endpoint
- failoverInferredConfig FailoverInferredConfig
-
Configurations derived from
FailoverConfig
- succeededEndpointIndex int
-
Index of the
CallerActions[]
array which given a successful response
Parameters
- path string
-
Resource path
- message RequestMessage
-
HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- path string
-
Resource path
- message RequestMessage (default ())
-
An optional HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- path string
-
Resource path
- message RequestMessage
-
An HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- path string
-
Resource path
- message RequestMessage
-
An HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- path string
-
Resource path
- message RequestMessage (default ())
-
An optional HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- httpVerb string
-
HTTP method to be used for the request
- path string
-
Resource path
- message RequestMessage
-
An HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- path string
-
Resource path
- message RequestMessage (default ())
-
An optional HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
Parameters
- path string
-
Resource path
- message RequestMessage (default ())
-
An optional HTTP request or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(Response | ClientError) The response or an
http:ClientError
if failed to fulfill the request
FailoverClient.submit()
function does not
return an http:Response
as the result. Rather it returns an http:HttpFuture
which can be used for subsequent interactions
with the HTTP endpoint.
Parameters
- httpVerb string
-
The HTTP verb value
- path string
-
The resource path
- message RequestMessage
-
An HTTP outbound request message or any payload of type
string
,xml
,json
,byte[]
,io:ReadableByteChannel
ormime:Entity[]
-
Return Type
(HttpFuture | ClientError) An
http:HttpFuture
that represents an asynchronous service invocation or else anhttp:ClientError
if the submission fails
http:Response
for a previously-submitted request.
Parameters
- httpFuture HttpFuture
-
The
http:HttpFuture
related to a previous asynchronous invocation
-
Return Type
(Response | ClientError) An
http:Response
message or else anhttp:ClientError
if the invocation fails
http:PushPromise
exists for a previously-submitted request.
Parameters
- httpFuture HttpFuture
-
The
http:HttpFuture
related to a previous asynchronous invocation
-
Return Type
(boolean) A
boolean
, which represents whether anhttp:PushPromise
exists
http:PushPromise
for a previously-submitted request.
Parameters
- httpFuture HttpFuture
-
The
http:HttpFuture
related to a previous asynchronous invocation
-
Return Type
(PushPromise | ClientError) An
http:PushPromise
message or else anhttp:ClientError
if the invocation fails
http:Response
message.
Parameters
- promise PushPromise
-
The related
http:PushPromise
-
Return Type
(Response | ClientError) A promised
http:Response
message or else anhttp:ClientError
if the invocation fails
http:PushPromise
. When an http:PushPromise
is rejected, there is no chance of fetching a promised
response using the rejected promise.
Parameters
- promise PushPromise
-
The Push Promise to be rejected