| @@ 110-120 (lines=11) @@ | ||
| 107 | ); |
|
| 108 | } |
|
| 109 | ||
| 110 | public function qos(FrameChannel $channel, Qos $command): Frame |
|
| 111 | { |
|
| 112 | return new Frame( |
|
| 113 | Type::method(), |
|
| 114 | $channel, |
|
| 115 | Methods::get('basic.qos'), |
|
| 116 | new UnsignedLongInteger(new Integer($command->prefetchSize())), |
|
| 117 | new UnsignedShortInteger(new Integer($command->prefetchCount())), |
|
| 118 | new Bits($command->isGlobal()) |
|
| 119 | ); |
|
| 120 | } |
|
| 121 | ||
| 122 | public function recover(FrameChannel $channel, Recover $command): Frame |
|
| 123 | { |
|
| @@ 47-60 (lines=14) @@ | ||
| 44 | ); |
|
| 45 | } |
|
| 46 | ||
| 47 | public function delete(FrameChannel $channel, Deletion $command): Frame |
|
| 48 | { |
|
| 49 | return new Frame( |
|
| 50 | Type::method(), |
|
| 51 | $channel, |
|
| 52 | Methods::get('exchange.delete'), |
|
| 53 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
| 54 | new ShortString(new Str($command->name())), |
|
| 55 | new Bits( |
|
| 56 | $command->onlyIfUnused(), |
|
| 57 | !$command->shouldWait() |
|
| 58 | ) |
|
| 59 | ); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| @@ 55-69 (lines=15) @@ | ||
| 52 | ); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function delete(FrameChannel $channel, Deletion $command): Frame |
|
| 56 | { |
|
| 57 | return new Frame( |
|
| 58 | Type::method(), |
|
| 59 | $channel, |
|
| 60 | Methods::get('queue.delete'), |
|
| 61 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
| 62 | new ShortString(new Str($command->name())), |
|
| 63 | new Bits( |
|
| 64 | $command->onlyIfUnused(), |
|
| 65 | $command->onlyIfEmpty(), |
|
| 66 | !$command->shouldWait() |
|
| 67 | ) |
|
| 68 | ); |
|
| 69 | } |
|
| 70 | ||
| 71 | public function bind(FrameChannel $channel, Binding $command): Frame |
|
| 72 | { |
|
| @@ 100-110 (lines=11) @@ | ||
| 97 | ); |
|
| 98 | } |
|
| 99 | ||
| 100 | public function purge(FrameChannel $channel, Purge $command): Frame |
|
| 101 | { |
|
| 102 | return new Frame( |
|
| 103 | Type::method(), |
|
| 104 | $channel, |
|
| 105 | Methods::get('queue.purge'), |
|
| 106 | new UnsignedShortInteger(new Integer(0)), //ticket (reserved) |
|
| 107 | new ShortString(new Str($command->name())), |
|
| 108 | new Bits(!$command->shouldWait()) |
|
| 109 | ); |
|
| 110 | } |
|
| 111 | } |
|
| 112 | ||