Module: OnStomp::Connections::Stomp_1
Overview
Connection behavior common to both STOMP 1.0 and STOMP 1.1 connections
Instance Method Summary (collapse)
-
- (OnStomp::Components::Frame) abort_frame(tx, h)
Creates an ABORT frame.
-
- (OnStomp::Components::Frame) begin_frame(tx, h)
Creates a BEGIN frame.
-
- (OnStomp::Components::Frame) commit_frame(tx, h)
Creates a COMMIT frame.
-
- (OnStomp::Components::Frame) connect_frame(*h)
Creates a CONNECT frame.
-
- (OnStomp::Components::Frame) disconnect_frame(h)
Creates a DISCONNECT frame.
-
- (OnStomp::Components::Frame) send_frame(d, b, h)
Creates a SEND frame.
-
- (OnStomp::Components::Frame) unsubscribe_frame(f, h)
Creates an UNSUBSCRIBE frame.
Instance Method Details
- (OnStomp::Components::Frame) abort_frame(tx, h)
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 |
- (OnStomp::Components::Frame) begin_frame(tx, h)
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 |
- (OnStomp::Components::Frame) commit_frame(tx, h)
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 |
- (OnStomp::Components::Frame) connect_frame(*h)
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 |
- (OnStomp::Components::Frame) disconnect_frame(h)
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 |
- (OnStomp::Components::Frame) send_frame(d, b, h)
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 |
- (OnStomp::Components::Frame) unsubscribe_frame(f, h)
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 |