Module: JMS::QueueBrowser
- Defined in:
- lib/jms/queue_browser.rb
Overview
Interface javax.jms.QueueBrowser
Instance Method Summary collapse
-
#each(params = {}, &block) ⇒ Object
For each message on the queue call the supplied Proc.
Instance Method Details
#each(params = {}, &block) ⇒ Object
For each message on the queue call the supplied Proc
20 21 22 23 24 25 26 27 |
# File 'lib/jms/queue_browser.rb', line 20 def each(params={}, &block) raise "JMS::QueueBrowser::each requires a code block to be executed for each message received" unless block e = self.getEnumeration while e.hasMoreElements block.call(e.nextElement) end end |