| @@ 130-140 (lines=11) @@ | ||
| 127 | ); |
|
| 128 | } |
|
| 129 | ||
| 130 | public function qos(FrameChannel $channel, Qos $command): Frame |
|
| 131 | { |
|
| 132 | return new Frame( |
|
| 133 | Type::method(), |
|
| 134 | $channel, |
|
| 135 | Methods::get('basic.qos'), |
|
| 136 | new UnsignedLongInteger(new Integer($command->prefetchSize())), |
|
| 137 | new UnsignedShortInteger(new Integer($command->prefetchCount())), |
|
| 138 | new Bits($command->isGlobal()) |
|
| 139 | ); |
|
| 140 | } |
|
| 141 | ||
| 142 | public function recover(FrameChannel $channel, Recover $command): Frame |
|
| 143 | { |
|
| @@ 67-80 (lines=14) @@ | ||
| 64 | ); |
|
| 65 | } |
|
| 66 | ||
| 67 | public function delete(FrameChannel $channel, Deletion $command): Frame |
|
| 68 | { |
|
| 69 | return new Frame( |
|
| 70 | Type::method(), |
|
| 71 | $channel, |
|
| 72 | Methods::get('exchange.delete'), |
|
| 73 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
| 74 | new ShortString(new Str($command->name())), |
|
| 75 | new Bits( |
|
| 76 | $command->onlyIfUnused(), |
|
| 77 | !$command->shouldWait() |
|
| 78 | ) |
|
| 79 | ); |
|
| 80 | } |
|
| 81 | } |
|
| 82 | ||
| @@ 64-78 (lines=15) @@ | ||
| 61 | ); |
|
| 62 | } |
|
| 63 | ||
| 64 | public function delete(FrameChannel $channel, Deletion $command): Frame |
|
| 65 | { |
|
| 66 | return new Frame( |
|
| 67 | Type::method(), |
|
| 68 | $channel, |
|
| 69 | Methods::get('queue.delete'), |
|
| 70 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
| 71 | new ShortString(new Str($command->name())), |
|
| 72 | new Bits( |
|
| 73 | $command->onlyIfUnused(), |
|
| 74 | $command->onlyIfEmpty(), |
|
| 75 | !$command->shouldWait() |
|
| 76 | ) |
|
| 77 | ); |
|
| 78 | } |
|
| 79 | ||
| 80 | public function bind(FrameChannel $channel, Binding $command): Frame |
|
| 81 | { |
|
| @@ 109-119 (lines=11) @@ | ||
| 106 | ); |
|
| 107 | } |
|
| 108 | ||
| 109 | public function purge(FrameChannel $channel, Purge $command): Frame |
|
| 110 | { |
|
| 111 | return new Frame( |
|
| 112 | Type::method(), |
|
| 113 | $channel, |
|
| 114 | Methods::get('queue.purge'), |
|
| 115 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
| 116 | new ShortString(new Str($command->name())), |
|
| 117 | new Bits(!$command->shouldWait()) |
|
| 118 | ); |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * @param MapInterface<string, mixed> $arguments |
|