Module: OnStomp::Interfaces::FrameMethods
- Included in:
- Client, Components::Scopes::HeaderScope, Components::Scopes::ReceiptScope, Components::Scopes::TransactionScope, Failover::Client
- Defined in:
- lib/onstomp/interfaces/frame_methods.rb
Overview
Instance Method Summary (collapse)
-
- (OnStomp::Components::Frame) abort(tx_id, headers = {})
Transmits an ABORT frame generated by the client's connection to rollback a transaction.
-
- (OnStomp::Components::Frame) ack(*args)
Transmits an ACK frame generated by the client's connection.
-
- (OnStomp::Components::Frame) beat
Transmits a client heartbeat frame generated by the client's connection.
-
- (OnStomp::Components::Frame) begin(tx_id, headers = {})
Transmits a BEGIN frame generated by the client's connection to start a transaction.
-
- (OnStomp::Components::Frame) commit(tx_id, headers = {})
Transmits a COMMIT frame generated by the client's connection to complete a transaction.
-
- (OnStomp::Components::Frame) disconnect(headers = {})
Transmits a DISCONNECT frame generated by the client's connection to end the STOMP session.
-
- (OnStomp::Components::Frame) nack(*args)
Transmits a NACK frame generated by the client's connection.
-
- (OnStomp::Components::Frame) send(dest, body, headers = {}) {|receipt| ... }
(also: #puts)
Transmits a SEND frame generated by the client's connection.
-
- (OnStomp::Components::Frame) subscribe(dest, headers = {}) {|message| ... }
Transmits a SUBSCRIBE frame generated by the client's connection.
-
- (OnStomp::Components::Frame) unsubscribe(frame_or_id, headers = {})
Transmits an UNSUBSCRIBE frame generated by the client's connection.
Instance Method Details
- (OnStomp::Components::Frame) abort(tx_id, headers = {})
Transmits an ABORT frame generated by the client's connection to rollback a transaction.
194 195 196 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 194 def abort tx_id, headers={} transmit connection.abort_frame(tx_id, headers) end |
- (OnStomp::Components::Frame) ack(message_frame, headers = {}) - (OnStomp::Components::Frame) ack(message_id, headers = {}) - (OnStomp::Components::Frame) ack(message_id, subscription_id, headers = {})
Transmits an ACK frame generated by the client's connection.
300 301 302 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 300 def ack *args transmit connection.ack_frame(*args) end |
- (OnStomp::Components::Frame) beat
Transmits a client heartbeat frame generated by the client's connection.
357 358 359 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 357 def beat transmit connection.heartbeat_frame end |
- (OnStomp::Components::Frame) begin(tx_id, headers = {})
Transmits a BEGIN frame generated by the client's connection to start a transaction.
172 173 174 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 172 def begin tx_id, headers={} transmit connection.begin_frame(tx_id, headers) end |
- (OnStomp::Components::Frame) commit(tx_id, headers = {})
Transmits a COMMIT frame generated by the client's connection to complete a transaction.
216 217 218 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 216 def commit tx_id, headers={} transmit connection.commit_frame(tx_id, headers) end |
- (OnStomp::Components::Frame) disconnect(headers = {})
Transmits a DISCONNECT frame generated by the client's connection to end the STOMP session.
235 236 237 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 235 def disconnect headers={} transmit connection.disconnect_frame headers end |
- (OnStomp::Components::Frame) nack(message_frame, headers = {}) - (OnStomp::Components::Frame) nack(message_id, subscription_id, heders = {})
Transmits a NACK frame generated by the client's connection.
343 344 345 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 343 def nack *args transmit connection.nack_frame(*args) end |
- (OnStomp::Components::Frame) send(dest, body, headers = {}) {|receipt| ... } Also known as: puts
Transmits a SEND frame generated by the client's connection
59 60 61 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 59 def send dest, body, headers={}, &cb transmit connection.send_frame(dest, body, headers), :receipt => cb end |
- (OnStomp::Components::Frame) subscribe(dest, headers = {}) {|message| ... }
Transmits a SUBSCRIBE frame generated by the client's connection. Depending
upon the connection, a subscription can be set to various MESSAGE
acknowledgement modes by setting the :ack
header.
STOMP 1.0 and STOMP 1.1 connections support:
* :ack => 'auto'
The broker assumes that MESSAGE frames received through the
subscription have been properly received, the client should NOT attempt
to ACK (or NACK) any of the messages.
* :ack => 'client'
The broker assumes that MESSAGE frames should be acknowledged by the
client through the use of ACK frames.
STOMP 1.1 connections support:
* :ack => 'client-individual'
Upon receiving an ACK frame for a MESSAGE frame, some brokers will
mark the MESSAGE frame and all those sent to the client before it
as acknowledged. This mode indicates that each MESSAGE frame must
be acknowledged by its own ACK frame for the broker can assume the
MESSAGE frame has been received by the client.
121 122 123 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 121 def subscribe dest, headers={}, &cb transmit connection.subscribe_frame(dest, headers), :subscribe => cb end |
- (OnStomp::Components::Frame) unsubscribe(subscribe_frame, headers = {}) - (OnStomp::Components::Frame) unsubscribe(id, headers = {})
Transmits an UNSUBSCRIBE frame generated by the client's connection.
150 151 152 |
# File 'lib/onstomp/interfaces/frame_methods.rb', line 150 def unsubscribe frame_or_id, headers={} transmit connection.unsubscribe_frame(frame_or_id, headers) end |