lib/onstomp/interfaces/frame_methods.rb in onstomp-1.0.2 vs lib/onstomp/interfaces/frame_methods.rb in onstomp-1.0.3
- old
+ new
@@ -62,11 +62,11 @@
alias :puts :send
# @api gem:1 STOMP:1.0,1.1* [+ack:client-individual]
# 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.
+ # 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.
@@ -237,47 +237,53 @@
end
# @api gem:1 STOMP:1.0,1.1! [+subscription:id]
# Transmits an ACK frame generated by the client's connection.
# @overload ack(message_frame, headers={})
+ # Generates an ACK frame for the given MESSAGE frame.
# @api gem:1 STOMP:1.0,1.1
# @note Users should use this form whenever possible as it will work
# with STOMP 1.0 and 1.1 connections.
# @param [OnStomp::Components::Frame] message_frame the MESSAGE frame to
# acknowledge.
# @param [{#to_sym => #to_s}] headers additional headers to include in
# the frame
+ # @return [OnStomp::Components::Frame]
# @example
# client.subscribe '/queue/test', :ack => 'client' do |m|
# if m[:'x-of-interest-to-me'] == 'hells yes'
# client.ack m
# end
# end
# @overload ack(message_id, headers={})
+ # Generates an ACK frame for the given `message-id`.
# @api gem:1 STOMP:1.0
# @note This form will raise an `ArgumentError` with STOMP 1.1 connections
# as a subscription ID is also required to ACK a received MESSAGE.
- # @param [String] message_id +message-id+ header of MESSAGE frame to
+ # @param [String] message_id `message-id` header of MESSAGE frame to
# acknowledge.
# @param [{#to_sym => #to_s}] headers additional headers to include in
# the frame
+ # @return [OnStomp::Components::Frame]
# @example
# client.subscribe '/queue/test', :ack => 'client' do |m|
# if m[:'x-of-interest-to-me'] == 'hells yes'
# client.ack m[:'message-id']
# end
# end
# @overload ack(message_id, subscription_id, headers={})
+ # Generates an ACK frame for the given `message-id` and `subscription`.
# @api gem:1 STOMP:1.0,1.1
# @note This form should be used with STOMP 1.1 connections when it is
# not possible to provide the actual MESSAGE frame.
- # @param [String] message_id +message-id+ header of MESSAGE frame to
+ # @param [String] message_id `message-id` header of MESSAGE frame to
# acknowledge.
# @param [String] subscription_id `subscription` header of MESSAGE frame to
# acknowledge.
# @param [{#to_sym => #to_s}] headers additional headers to include in
# the frame
+ # @return [OnStomp::Components::Frame]
# @example
# client.subscribe '/queue/test', :ack => 'client' do |m|
# if m[:'x-of-interest-to-me'] == 'hells yes'
# client.ack m[:'message-id'], m[:subscription]
# end
@@ -301,22 +307,25 @@
# Generates a NACK frame for the given MESSAGE frame.
# @param [OnStomp::Components::Frame] message_frame the MESSAGE frame to
# un-acknowledge.
# @param [{#to_sym => #to_s}] headers additional headers to include in
# the frame
+ # @return [OnStomp::Components::Frame]
# @example
# client.subscribe '/queue/test', :ack => 'client' do |m|
# if m[:'x-of-interest-to-me'] == 'hells no!'
# client.nack m
# end
# end
# @overload nack(message_id, subscription_id, heders={})
- # @param [String] message_id +message-id+ header of MESSAGE frame to
+ # Generates a NACK frame for the given `message-id` and `subscription`.
+ # @param [String] message_id `message-id` header of MESSAGE frame to
# un-acknowledge.
# @param [String] subscription_id `subscription` header of MESSAGE frame to
# un-acknowledge.
# @param [{#to_sym => #to_s}] headers additional headers to include in
# the frame
+ # @return [OnStomp::Components::Frame]
# @example
# client.subscribe '/queue/test', :ack => 'client' do |m|
# if m[:'x-of-interest-to-me'] == 'hells no!'
# client.nack m[:'message-id'], m[:subscription]
# end