diff options
author | Nuno Santos <nsantos@apache.org> | 2012-01-12 19:48:53 +0000 |
---|---|---|
committer | Nuno Santos <nsantos@apache.org> | 2012-01-12 19:48:53 +0000 |
commit | 406ff602a70cc507d93cb74b578bf867e503dfc4 (patch) | |
tree | e794059433606f801b55e0639bd0178d4bec26ba /cpp/bindings/qpid/ruby | |
parent | 0d7401d01394f31b20d23316f79f09f1a197b97f (diff) | |
download | qpid-python-406ff602a70cc507d93cb74b578bf867e503dfc4.tar.gz |
QPID-3750: [RUBY] Cleaned up Rdocs for a few more classes (patches from Darryl Pierce)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1230731 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/ruby')
-rw-r--r-- | cpp/bindings/qpid/ruby/lib/qpid/duration.rb | 27 | ||||
-rw-r--r-- | cpp/bindings/qpid/ruby/lib/qpid/receiver.rb | 17 | ||||
-rw-r--r-- | cpp/bindings/qpid/ruby/lib/qpid/sender.rb | 12 |
3 files changed, 47 insertions, 9 deletions
diff --git a/cpp/bindings/qpid/ruby/lib/qpid/duration.rb b/cpp/bindings/qpid/ruby/lib/qpid/duration.rb index 1544075d70..e1ddd79cb6 100644 --- a/cpp/bindings/qpid/ruby/lib/qpid/duration.rb +++ b/cpp/bindings/qpid/ruby/lib/qpid/duration.rb @@ -27,13 +27,32 @@ module Qpid # # It defines the following named values as symbols: # - # :FOREVER :: the maximum integer value for the platform - # :IMMEDIATE :: an alias for 0 - # :SECOND :: 1,000ms - # :MINUTE :: 60,000ms + # [:FOREVER] + # The maximum integer value for the platform. Effectively this will wait + # forever. + # + # [:IMMEDIATE] + # An alias for 0 milliseconds. + # + # [:SECOND] + # An alias for 1,000 milliseconds. + # + # [:MINUTE] + # And alias for 60,000 millisecons. + # class Duration # Creates a Duration with the specified length, in milliseconds. + # + # ==== Options + # + # * length - The duration in milliseconds. + # + # ==== Examples + # + # # Wait up to 10 seconds for an incoming message + # receiver.get Qpid::Messaging::Duration.new 10000 + # def initialize length @duration_impl = Cqpid::Duration.new length end diff --git a/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb b/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb index 100ee4ea76..0ce16309ed 100644 --- a/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb +++ b/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb @@ -114,6 +114,7 @@ module Qpid # ==== Examples # # receiver.capacity = 50 # sets the incoming capacity to 50 messages + # def capacity=(capacity); @receiver_impl.setCapacity capacity; end # Returns the capacity. @@ -124,7 +125,8 @@ module Qpid # # ==== Examples # - # puts "The receiver can hold #{rcv.capacity} messages." + # puts "The receiver can hold #{rcv.capacity} messages." + # def capacity; @receiver_impl.getCapacity; end # Returns the number of slots for receiving messages. @@ -135,13 +137,19 @@ module Qpid # ==== Examples # # puts "You can receive #{rcv.available} messages before blocking." + # def available; @receiver_impl.getAvailable; end # Returns the number of messages that have been received and acknowledged # but whose acknowledgements have not been confirmed by the sender. + # + # ==== Examples + # + # puts "You have #{rcv.unsettled} messages to be confirmed." + # def unsettled; @receiver_impl.getUnsettled; end - # Closes this +Reciever+. + # Closes this +Receiver+. # # This does not affect the +Session+. def close; @receiver_impl.close; end @@ -150,14 +158,15 @@ module Qpid # # ==== Examples # - # recv.close unless recv.closed? + # recv.close unless recv.closed? + # def closed?; @receiver_impl.isClosed; end # Returns the name of this +Receiver+. # # ==== Examples # - # puts "Receiver: #{recv.name}" + # puts "Receiver: #{recv.name}" def name; @receiver_impl.getName; end # Returns the Session for this +Receiver+. diff --git a/cpp/bindings/qpid/ruby/lib/qpid/sender.rb b/cpp/bindings/qpid/ruby/lib/qpid/sender.rb index 345702a565..97227622f5 100644 --- a/cpp/bindings/qpid/ruby/lib/qpid/sender.rb +++ b/cpp/bindings/qpid/ruby/lib/qpid/sender.rb @@ -80,7 +80,8 @@ module Qpid # # ==== Examples # - # puts "Sender: #{sender.name}" + # puts "Sender: #{sender.name}" + # def name; @sender_impl.getName; end # Sets the capacity for this +Sender+. @@ -95,6 +96,7 @@ module Qpid # ==== Examples # # sender.capacity = 50 # sets the outgoing capacity to 50 messages + # def capacity=(capacity); @sender_impl.setCapacity capacity; end # Returns the capacity. @@ -105,6 +107,7 @@ module Qpid # ==== Examples # # puts "You can send a maximum of #{sender.capacity} messages." + # def capacity; @sender_impl.getCapacity; end # Returns the number of messages sent that are pending receipt @@ -115,6 +118,7 @@ module Qpid # if sender.unsettled > 0 # puts "There are #{sender.unsettled} messages pending." # end + # def unsettled; @sender_impl.getUnsettled; end # Returns the available slots for sending messages. @@ -127,11 +131,17 @@ module Qpid # ==== Examples # # puts "You can send #{sender.available} messages before blocking." + # def available @sender_impl.getAvailable end # Returns the +Session+ for this sender. + # + # ==== Examples + # + # recv.session.close if done + # def session; @session; end end |