1 | <?php |
||
14 | class SendMetricOnMessageConsumed implements ListenerInterface |
||
15 | { |
||
16 | /** @var MetricService */ |
||
17 | private $metricService; |
||
18 | |||
19 | /** @var Clock */ |
||
20 | private $clock; |
||
21 | |||
22 | /** @var null|float */ |
||
23 | private $messageReceivedAt; |
||
24 | |||
25 | /** |
||
26 | * SendMetricOnMessageConsumed constructor. |
||
27 | * |
||
28 | * @param MetricService $metricService |
||
29 | * @param Clock|null $clock |
||
30 | */ |
||
31 | 9 | public function __construct(MetricService $metricService, Clock $clock = null) |
|
36 | |||
37 | /** |
||
38 | * @param EventInterface | MessageConsumed $event |
||
39 | * |
||
40 | * @throws ListenerException |
||
41 | */ |
||
42 | 6 | public function handle(EventInterface $event) |
|
58 | |||
59 | public function isListener($listener) |
||
63 | } |
||
64 |