1 | <?php |
||
10 | abstract class RpcClient |
||
11 | { |
||
12 | private $queue; |
||
13 | private $connection; |
||
14 | private $body; |
||
15 | private $channel; |
||
16 | private $callbackQueue; |
||
17 | private $response; |
||
18 | private $correlationId; |
||
19 | |||
20 | public function __construct($queueName, ConnectionManagerInterface $manager) |
||
27 | |||
28 | /** |
||
29 | * @param AMQPMessage $rep |
||
30 | */ |
||
31 | public function onResponse(AMQPMessage $rep) |
||
37 | |||
38 | /** |
||
39 | * @return null|string |
||
40 | */ |
||
41 | public function call() |
||
68 | |||
69 | /** |
||
70 | * @param string $body |
||
71 | */ |
||
72 | public function declareMessage($body) |
||
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | public function getMessage() |
||
84 | |||
85 | /** |
||
86 | * @param AbstractChannel $channel |
||
87 | */ |
||
88 | public function setChannel(AbstractChannel $channel) |
||
92 | |||
93 | /** |
||
94 | * @return \PhpAmqpLib\Channel\AMQPChannel |
||
95 | */ |
||
96 | public function getChannel() |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getQueueName() |
||
108 | |||
109 | /** |
||
110 | * @return ConnectionManagerInterface |
||
111 | */ |
||
112 | public function getConnection() |
||
116 | |||
117 | /** |
||
118 | * @param \PhpAmqpLib\Connection\AMQPStreamConnection $connection |
||
119 | */ |
||
120 | public function setConnection(AMQPStreamConnection $connection) |
||
124 | } |