PHP Class Ddd\Infrastructure\Application\Notification\AmqpExchangeListener

Exibir arquivo Open project: carlosbuenosvinos/ddd

Protected Properties

Property Type Description
$closed boolean Flag to indicate if this listener is closed.
$loop React\EventLoop\LoopInterface Event loop.
$queue AMQPQueue AMQP message queue to read messages from.

Public Methods

Method Description
__construct ( AMQPQueue $queue, React\EventLoop\LoopInterface $loop, JMS\Serializer\Serializer $serializer )
close ( )
listen ( )
stop ( )

Protected Methods

Method Description
handle ( stdClass $event ) : void The action to perform
listensTo ( string $typeName ) : boolean This method will be responsible to decide whether this listener listens to an specific event type or not, given an event type name

Method Details

__construct() public method

public __construct ( AMQPQueue $queue, React\EventLoop\LoopInterface $loop, JMS\Serializer\Serializer $serializer )
$queue AMQPQueue
$loop React\EventLoop\LoopInterface
$serializer JMS\Serializer\Serializer

close() public method

public close ( )

handle() abstract protected method

The action to perform
abstract protected handle ( stdClass $event ) : void
$event stdClass
return void

listen() public method

public listen ( )

listensTo() abstract protected method

This method will be responsible to decide whether this listener listens to an specific event type or not, given an event type name
abstract protected listensTo ( string $typeName ) : boolean
$typeName string
return boolean

stop() public method

public stop ( )

Property Details

$closed protected_oe property

Flag to indicate if this listener is closed.
protected bool $closed
return boolean

$loop protected_oe property

Event loop.
protected LoopInterface,React\EventLoop $loop
return React\EventLoop\LoopInterface

$queue protected_oe property

AMQP message queue to read messages from.
protected AMQPQueue $queue
return AMQPQueue