Class Bunny::Channel09
In: lib/bunny/channel09.rb
Parent: Qrack::Channel
StandardError ForcedConnectionCloseError UnsubscribeError ConnectionError ServerDownError AcknowledgementError MessageError ProtocolError ForcedChannelCloseError Qrack::Client Client Client09 Qrack::Channel Channel Channel09 Qrack::Queue Queue09 Queue Qrack::Subscription Subscription09 Subscription Exchange09 Exchange Qrack lib/bunny/exchange09.rb lib/bunny/queue08.rb lib/bunny/exchange08.rb lib/bunny/client09.rb lib/bunny/channel09.rb lib/bunny/queue09.rb lib/bunny/client08.rb lib/bunny.rb lib/bunny/subscription09.rb lib/bunny/subscription08.rb lib/bunny/channel08.rb Bunny dot/m_10_0.png

Methods

close   new   open   open?  

Public Class methods

[Source]

   # File lib/bunny/channel09.rb, line 4
4:                 def initialize(client)
5:                         super
6:                 end

Public Instance methods

[Source]

    # File lib/bunny/channel09.rb, line 20
20:                 def close
21:                         client.channel = self
22:                         client.send_frame(
23:               Qrack::Protocol09::Channel::Close.new(:reply_code => 200, :reply_text => 'bye', :method_id => 0, :class_id => 0)
24:             )
25:         
26:             method = client.next_method
27:                         
28:                         client.check_response(method, Qrack::Protocol09::Channel::CloseOk, "Error closing channel #{number}")
29:         
30:                         @active = false
31:                         :close_ok
32:                 end

[Source]

    # File lib/bunny/channel09.rb, line 8
 8:                 def open
 9:                         client.channel = self
10:                         client.send_frame(Qrack::Protocol09::Channel::Open.new)
11:                         
12:       method = client.next_method
13:                         
14:                         client.check_response(method, Qrack::Protocol09::Channel::OpenOk, "Cannot open channel #{number}")
15: 
16:                         @active = true
17:                         :open_ok
18:                 end

[Source]

    # File lib/bunny/channel09.rb, line 34
34:                 def open?
35:                         active
36:                 end

[Validate]