Module: OnStomp::Connections::Stomp_1
Overview
Connection behavior common to both STOMP 1.0 and STOMP 1.1 connections
Instance Method Summary collapse
-
#abort_frame(tx, h) ⇒ OnStomp::Components::Frame
Creates an ABORT frame.
-
#begin_frame(tx, h) ⇒ OnStomp::Components::Frame
Creates a BEGIN frame.
-
#commit_frame(tx, h) ⇒ OnStomp::Components::Frame
Creates a COMMIT frame.
-
#connect_frame(*h) ⇒ OnStomp::Components::Frame
Creates a CONNECT frame.
-
#disconnect_frame(h) ⇒ OnStomp::Components::Frame
Creates a DISCONNECT frame.
-
#send_frame(d, b, h) ⇒ OnStomp::Components::Frame
Creates a SEND frame.
-
#unsubscribe_frame(f, h) ⇒ OnStomp::Components::Frame
Creates an UNSUBSCRIBE frame.
Instance Method Details
#abort_frame(tx, h) ⇒ OnStomp::Components::Frame
Creates an ABORT frame
31 32 33 |
# File 'lib/onstomp/connections/stomp_1.rb', line 31 def abort_frame tx, h create_transaction_frame 'ABORT', tx, h end |
#begin_frame(tx, h) ⇒ OnStomp::Components::Frame
Creates a BEGIN frame
19 20 21 |
# File 'lib/onstomp/connections/stomp_1.rb', line 19 def begin_frame tx, h create_transaction_frame 'BEGIN', tx, h end |
#commit_frame(tx, h) ⇒ OnStomp::Components::Frame
Creates a COMMIT frame
25 26 27 |
# File 'lib/onstomp/connections/stomp_1.rb', line 25 def commit_frame tx, h create_transaction_frame 'COMMIT', tx, h end |
#connect_frame(*h) ⇒ OnStomp::Components::Frame
Creates a CONNECT frame
7 8 9 |
# File 'lib/onstomp/connections/stomp_1.rb', line 7 def connect_frame *h create_frame 'CONNECT', h end |
#disconnect_frame(h) ⇒ OnStomp::Components::Frame
Creates a DISCONNECT frame
37 38 39 |
# File 'lib/onstomp/connections/stomp_1.rb', line 37 def disconnect_frame h create_frame 'DISCONNECT', [h] end |
#send_frame(d, b, h) ⇒ OnStomp::Components::Frame
Creates a SEND frame
13 14 15 |
# File 'lib/onstomp/connections/stomp_1.rb', line 13 def send_frame d, b, h create_frame 'SEND', [h, {:destination => d}], b end |
#unsubscribe_frame(f, h) ⇒ OnStomp::Components::Frame
Creates an UNSUBSCRIBE frame
43 44 45 46 47 48 |
# File 'lib/onstomp/connections/stomp_1.rb', line 43 def unsubscribe_frame f, h id = f.is_a?(OnStomp::Components::Frame) ? f[:id] : f create_frame('UNSUBSCRIBE', [{:id => id}, h]).tap do |f| raise ArgumentError, 'subscription ID could not be determined' unless f.header?(:id) end end |