Esempio n. 1
0
 /**
  * Begin server transaction
  *
  * @param   peer.stomp.Transaction transaction
  * @return  peer.stomp.Transaction
  */
 public function begin(Transaction $transaction)
 {
     $transaction->begin($this);
     return $transaction;
 }
Esempio n. 2
0
 /**
  * Reject given message
  * 
  * @param  peer.stomp.Transaction $t
  */
 public function nack(Transaction $t = null)
 {
     $this->assertConnection();
     $frame = new NackFrame($this->getMessageId(), $this->getSubscription()->getId());
     if ($t) {
         $frame->setTransaction($t->getName());
     }
     $this->getDestination()->getConnection()->sendFrame($frame);
 }
Esempio n. 3
0
 public function accepts_transaction_name()
 {
     $t = new Transaction('foobar');
     $this->assertEquals('foobar', $t->getName());
 }