Clients - http : LoadBalanceClient

LoadBalanceClient endpoint provides load balancing functionality over multiple HTTP clients.

Constructor

__init

(LoadBalanceClientConfiguration loadBalanceClientConfig)

Remote Methods

post The POST remote function implementation of the LoadBalancer Connector.
head The HEAD remote function implementation of the LoadBalancer Connector.
patch The PATCH remote function implementation of the LoadBalancer Connector.
put The PUT remote function implementation of the Load Balance Connector.
options The OPTIONS remote function implementation of the LoadBalancer Connector.
forward The FORWARD remote function implementation of the LoadBalancer Connector.
execute The EXECUTE remote function implementation of the LoadBalancer Connector. The Execute remote function can be used to invoke an HTTP call with the given HTTP verb.
delete The DELETE remote function implementation of the LoadBalancer Connector.
get The GET remote function implementation of the LoadBalancer Connector.
submit The submit implementation of the LoadBalancer Connector.
getResponse The getResponse implementation of the LoadBalancer Connector.
hasPromise The hasPromise implementation of the LoadBalancer Connector.
getNextPromise The getNextPromise implementation of the LoadBalancer Connector.
getPromisedResponse The getPromisedResponse implementation of the LoadBalancer Connector.
rejectPromise The rejectPromise implementation of the LoadBalancer Connector.

Fields

  • loadBalanceClientsArray Client?[]
  • Array of HTTP clients for load balancing

  • failover boolean
  • Whether to fail over in case of a failure

post

(string path, RequestMessage message)

returns Response | ClientError

The POST remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage
  • An HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

The HEAD remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage (default ())
  • An optional HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

patch

(string path, RequestMessage message)

returns Response | ClientError

The PATCH remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage
  • An HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

put

(string path, RequestMessage message)

returns Response | ClientError

The PUT remote function implementation of the Load Balance Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage
  • An HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

options

(string path, RequestMessage message)

returns Response | ClientError

The OPTIONS remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage (default ())
  • An optional HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

forward

(string path, Request request)

returns Response | ClientError

The FORWARD remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • request Request
  • An optional HTTP request

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

execute

(string httpVerb, string path, RequestMessage message)

returns Response | ClientError

The EXECUTE remote function implementation of the LoadBalancer Connector. The Execute remote function can be used to invoke an HTTP call with the given HTTP verb.

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 or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

delete

(string path, RequestMessage message)

returns Response | ClientError

The DELETE remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage (default ())
  • An HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

get

(string path, RequestMessage message)

returns Response | ClientError

The GET remote function implementation of the LoadBalancer Connector.

Parameters

  • path string
  • Resource path

  • message RequestMessage (default ())
  • An optional HTTP request or any payload of type string, xml, json, byte[], io:ReadableByteChannel or mime:Entity[]

  • Return Type

    (Response | ClientError)
  • The response or an http:ClientError if failed to fulfill the request

submit

(string httpVerb, string path, RequestMessage message)

returns HttpFuture | ClientError

The submit implementation of the LoadBalancer Connector.

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, or mime:Entity[]

  • Return Type

    (HttpFuture | ClientError)
  • An http:HttpFuture that represents an asynchronous service invocation or else an http:ClientError if the submission fails

getResponse

(HttpFuture httpFuture)

returns Response | ClientError

The getResponse implementation of the LoadBalancer Connector.

Parameters

  • httpFuture HttpFuture
  • The http:HttpFuture related to a previous asynchronous invocation

  • Return Type

    (Response | ClientError)
  • An http:Response message or else an http:ClientError if the invocation fails

hasPromise

(HttpFuture httpFuture)

returns boolean

The hasPromise implementation of the LoadBalancer Connector.

Parameters

  • httpFuture HttpFuture
  • The http:HttpFuture related to a previous asynchronous invocation

  • Return Type

    (boolean)
  • A boolean, which represents whether an http:PushPromise exists

getNextPromise

(HttpFuture httpFuture)

returns PushPromise | ClientError

The getNextPromise implementation of the LoadBalancer Connector.

Parameters

  • httpFuture HttpFuture
  • The http:HttpFuture related to a previous asynchronous invocation

  • Return Type

    (PushPromise | ClientError)
  • An http:PushPromise message or else an http:ClientError if the invocation fails

getPromisedResponse

(PushPromise promise)

returns Response | ClientError

The getPromisedResponse implementation of the LoadBalancer Connector.

Parameters

  • Return Type

    (Response | ClientError)
  • A promised http:Response message or else an http:ClientError if the invocation fails

rejectPromise

The rejectPromise implementation of the LoadBalancer Connector.

Parameters