示例#1
0
 /**
  * @inheritdoc
  */
 public function createChannel(ConnectionInterface $connection)
 {
     // we have to be connected before instantiating a channel
     if (!$connection->isConnected()) {
         $connection->connect();
     }
     $delegate = new \AMQPChannel($connection->getDelegate());
     return new Channel($delegate, $connection);
 }
示例#2
0
 /**
  * @inheritdoc
  */
 protected function getDelegate(ConnectionInterface $conn)
 {
     return new \AMQPChannel($conn->getDelegate());
 }