Clients - http : LoadBalanceClient

LoadBalanceClient endpoint provides load balancing functionality over multiple HTTP clients.

Constructor

__init

(LoadBalanceClientEndpointConfiguration loadBalanceClientConfig)

Remote Methods

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 | error

The POST remote function implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

The HEAD remote function implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

patch

(string path, RequestMessage message)

returns Response | error

The PATCH remote function implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

put

(string path, RequestMessage message)

returns Response | error

The PUT remote function implementation of the Load Balance Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

options

(string path, RequestMessage message)

returns Response | error

The OPTIONS remote function implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

forward

(string path, Request request)

returns Response | error

The FORWARD remote function implementation of the LoadBalancer Connector.

Parameters

  • request Request
  • An optional HTTP request

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

execute

(string httpVerb, string path, RequestMessage message)

returns Response | error

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

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

delete

(string path, RequestMessage message)

returns Response | error

The DELETE remote function implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

get

(string path, RequestMessage message)

returns Response | error

The GET remote function implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • The response or an error if failed to fulfill the request

submit

(string httpVerb, string path, RequestMessage message)

returns HttpFuture | error

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 | error)
  • An HttpFuture that represents an asynchronous service invocation, or an error if the submission fails

getResponse

(HttpFuture httpFuture)

returns Response | error

The getResponse implementation of the LoadBalancer Connector.

Parameters

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

  • Return Type

    (Response | error)
  • An HTTP response message, or an error if the invocation fails

hasPromise

(HttpFuture httpFuture)

returns boolean

The hasPromise implementation of the LoadBalancer Connector.

Parameters

  • httpFuture HttpFuture
  • The HttpFuture relates to a previous asynchronous invocation

  • Return Type

    (boolean)
  • A boolean that represents whether a PushPromise exists

getNextPromise

(HttpFuture httpFuture)

returns PushPromise | error

The getNextPromise implementation of the LoadBalancer Connector.

Parameters

  • httpFuture HttpFuture
  • The HttpFuture relates to a previous asynchronous invocation

  • Return Type

    (PushPromise | error)
  • An HTTP Push Promise message, or an error if the invocation fails

getPromisedResponse

(PushPromise promise)

returns Response | error

The getPromisedResponse implementation of the LoadBalancer Connector.

Parameters

  • Return Type

    (Response | error)
  • A promised HTTP Response message, or an error if the invocation fails

rejectPromise

The rejectPromise implementation of the LoadBalancer Connector.

Parameters