AMQP Client entry point.
Use this interface to create an instance of @see \io\vertx\jphp\amqp\AmqpClient and connect to a broker and server.
package |
Default |
---|
__construct()
close( $arg0) : void
The client must always be closed once not needed anymore.
callable
connect( $arg0) : $this
callable
$this
create( $arg0, $arg1 = null) : \io\vertx\jphp\amqp\AmqpClient
param $options [array] the AMQP client options, may be {@code null} falling back to the default configuration create($options)
Creates a new instance of @see \io\vertx\jphp\amqp\AmqpClient with the given Vert.x instance and the given options.
param $vertx [Vertx] the vert.x instance, must not be {@code null} param $options [array] the AMQP options, may be @{code null} falling back to the default configuration create($vertx, $options)
array | Vertx
array
\io\vertx\jphp\amqp\AmqpClient
the created instances.
createReceiver( $arg0, $arg1, $arg2 = null, $arg3 = null) : $this
You can retrieve the connection using @see \io\vertx\jphp\amqp\AmqpReceiver::connection.
param $address [string] The source address to attach the consumer to, must not be {@code null} param $completionHandler [callable] the handler called with the receiver. The receiver has been opened. createReceiver($address, $completionHandler)
Creates a receiver used to consume messages from the given address. This method avoids having to connect explicitly. You can retrieve the connection using @see \io\vertx\jphp\amqp\AmqpReceiver::connection.
param $address [string] The source address to attach the consumer to, must not be {@code null} param $messageHandler [callable] The message handler, must not be {@code null} param $completionHandler [callable] the handler called with the receiver that has been opened. Note that the {@code messageHandler} can be called before the {@code completionHandler} if messages are awaiting delivery. createReceiver($address, $messageHandler, $completionHandler)
Creates a receiver used to consumer messages from the given address. This method avoids having to connect explicitly. You can retrieve the connection using @see \io\vertx\jphp\amqp\AmqpReceiver::connection.
param $address [string] The source address to attach the consumer to. param $receiverOptions [array] The options for this receiver. param $messageHandler [callable] The message handler, must not be {@code null} param $completionHandler [callable] The handler called with the receiver, once opened. Note that the {@code messageHandler} can be called before the {@code completionHandler} if messages are awaiting delivery. createReceiver($address, $receiverOptions, $messageHandler, $completionHandler)
string
callable | array
callable
callable
$this
the client.
createSender( $arg0, $arg1, $arg2 = null) : $this
param $address [string] The target address to attach to, must not be {@code null} param $completionHandler [callable] The handler called with the sender, once opened createSender($address, $completionHandler)
Creates a sender used to send messages to the given address. The address must be set.
param $address [string] The target address to attach to, must not be {@code null} param $options [array] The options for this sender. param $completionHandler [callable] The handler called with the sender, once opened createSender($address, $options, $completionHandler)
string
callable | array
callable
$this
the client.