HttpEndpoint

for HTTP endpoint (REST api).

Consumers receive a HTTP client configured with the host and port of the endpoint.

package

Default

Methods

__construct

__construct() 

Same as @see \io\vertx\jphp\servicediscovery\types\HttpEndpoint::createRecord but without metadata, using the port 80 and using "/" as root.

createRecord( $arg0,  $arg1,  $arg2 = null,  $arg3 = null,  $arg4 = null,  $arg5 = null) : \io\vertx\jphp\servicediscovery\Record
static

param $name [string] the name param $host [string] the host createRecord($name, $host)

Same as @see \io\vertx\jphp\servicediscovery\types\HttpEndpoint::createRecord but without metadata.

param $name [string] the service name param $host [string] the host, must be public param $port [integer] the port param $root [string] the root, if not set "/" is used createRecord($name, $host, $port, $root)

Convenient method to create a record for a HTTP endpoint.

param $name [string] the service name param $host [string] the host (IP or DNS name), it must be the public IP / name param $port [integer] the port, it must be the public port param $root [string] the path of the service, "/" if not set param $metadata [array] additional metadata createRecord($name, $host, $port, $root, $metadata)

Same as @see \io\vertx\jphp\servicediscovery\types\HttpEndpoint::createRecord but let you configure whether or not the service is using https.

param $name [string] the service name param $ssl [boolean] whether or not the service is using HTTPS param $host [string] the host (IP or DNS name), it must be the public IP / name param $port [integer] the port, it must be the public port param $root [string] the path of the service, "/" if not set param $metadata [array] additional metadata createRecord($name, $ssl, $host, $port, $root, $metadata)

Arguments

$arg0

string

$arg1

boolean | string

$arg2

string | integer

$arg3

string | integer

$arg4

string | array

$arg5

array

Response

\io\vertx\jphp\servicediscovery\Record

the created record

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

getClient( $arg0,  $arg1,  $arg2,  $arg3 = null) : void
static

param $discovery [ServiceDiscovery] The service discovery instance param $filter [array] The filter, optional param $resultHandler [callable] The result handler getClient($discovery, $filter, $resultHandler)

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

param $discovery [ServiceDiscovery] The service discovery instance param $filter [callable] The filter param $resultHandler [callable] The result handler getClient($discovery, $filter, $resultHandler)

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client

param $discovery [ServiceDiscovery] The service discovery instance param $filter [array] The filter, optional param $conf [array] the configuration of the client param $resultHandler [callable] The result handler getClient($discovery, $filter, $conf, $resultHandler)

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.

param $discovery [ServiceDiscovery] The service discovery instance param $filter [callable] The filter param $conf [array] the configuration of the client param $resultHandler [callable] The result handler getClient($discovery, $filter, $conf, $resultHandler)

Arguments

$arg0

ServiceDiscovery

$arg1

callable | array

$arg2

callable | array

$arg3

callable

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

getWebClient( $arg0,  $arg1,  $arg2,  $arg3 = null) : void
static

param $discovery [ServiceDiscovery] The service discovery instance param $filter [array] The filter, optional param $resultHandler [callable] The result handler getWebClient($discovery, $filter, $resultHandler)

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

param $discovery [ServiceDiscovery] The service discovery instance param $filter [callable] The filter param $resultHandler [callable] The result handler getWebClient($discovery, $filter, $resultHandler)

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client

param $discovery [ServiceDiscovery] The service discovery instance param $filter [array] The filter, optional param $conf [array] the configuration of the client param $resultHandler [callable] The result handler getWebClient($discovery, $filter, $conf, $resultHandler)

Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.

param $discovery [ServiceDiscovery] The service discovery instance param $filter [callable] The filter param $conf [array] the configuration of the client param $resultHandler [callable] The result handler getWebClient($discovery, $filter, $conf, $resultHandler)

Arguments

$arg0

ServiceDiscovery

$arg1

callable | array

$arg2

callable | array

$arg3

callable

Constants

Unknown type.

UNKNOWN
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

TYPE

TYPE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件