Service type for data producer. Providers are publishing data to a specific event bus address.
package |
Default |
---|
__construct()
createRecord( $arg0, $arg1, $arg2 = null, $arg3 = null) : \io\vertx\jphp\servicediscovery\Record
param $name [string] the name of the service param $address [string] the address on which the data is sent. createRecord($name, $address)
Same as @see \io\vertx\jphp\servicediscovery\types\MessageSource::createRecord without additional metadata.
param $name [string] the name of the service param $address [string] the address on which the data is sent param $type [string] the type of payload createRecord($name, $address, $type)
Create a record representing a data producer.
param $name [string] the name of the service param $address [string] the address on which the data is sent param $type [string] the type of payload (fully qualified name of the class) param $metadata [array] additional metadata createRecord($name, $address, $type, $metadata)
string
string
string
array
\io\vertx\jphp\servicediscovery\Record
the created record
getConsumer( $arg0, $arg1, $arg2) : void
param $discovery [ServiceDiscovery] The service discovery instance param $filter [array] The filter, optional param $resultHandler [callable] The result handler getConsumer($discovery, $filter, $resultHandler)
Convenient method that looks for a message source 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, must not be {@code null} param $resultHandler [callable] The result handler getConsumer($discovery, $filter, $resultHandler)
ServiceDiscovery
callable | array
callable
UNKNOWN
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|
TYPE
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|