MessageProducer

Represents a stream of message that can be written to.

package

Default

Methods

__construct

__construct() 

address

address() : string

Response

string

The address to which the producer produces messages.

Closes the producer, this method should be called when the message producer is not used anymore.

close() : void

Update the delivery options of this producer.

deliveryOptions( $arg0) : $this

Arguments

$arg0

array | DeliveryOptions

Response

$this

this producer object

drainHandler

drainHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Closes the producer, calls @see \io\vertx\jphp\core\eventbus\MessageProducer::close

end( $arg0 = null) : void

end()

Same as @see \io\vertx\jphp\core\eventbus\MessageProducer::end but writes some data to the stream before ending.

param $t [mixed] end($t)

Arguments

$arg0

mixed

exceptionHandler

exceptionHandler( $arg0) : $this

Arguments

$arg0

callable

Response

$this

This method actually sends a message using the send semantic regardless this producer is a sender or a publisher.

send( $arg0,  $arg1 = null) : \io\vertx\jphp\core\eventbus\MessageProducer<T>

param $message [mixed] the message to send send($message)

Like @see \io\vertx\jphp\core\eventbus\MessageProducer::send but specifying a replyHandler that will be called if the recipient subsequently replies to the message.

param $message [mixed] the message to send param $replyHandler [callable] reply handler will be called when any reply from the recipient is received, may be {@code null} send($message, $replyHandler)

Arguments

$arg0

mixed

$arg1

callable

Response

\io\vertx\jphp\core\eventbus\MessageProducer

reference to this for fluency

setWriteQueueMaxSize

setWriteQueueMaxSize( $arg0) : $this

Arguments

$arg0

integer

Response

$this

write

write( $arg0) : $this

Arguments

$arg0

mixed

Response

$this

This will return <code>true</code> if there are more bytes in the write queue than the value set using @see \io\vertx\jphp\core\eventbus\MessageProducer::setWriteQueueMaxSize

writeQueueFull() : boolean

Response

boolean

true if write queue is full

Constants

DEFAULT_WRITE_QUEUE_MAX_SIZE

DEFAULT_WRITE_QUEUE_MAX_SIZE
var

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