Class: Qwirk::Adapter::JMS::Publisher::MyConsumer
- Inherits:
-
Object
- Object
- Qwirk::Adapter::JMS::Publisher::MyConsumer
- Defined in:
- lib/qwirk/adapter/jms/publisher.rb
Instance Attribute Summary collapse
-
#worker_name ⇒ Object
readonly
Returns the value of attribute worker_name.
Instance Method Summary collapse
-
#initialize(consumer) ⇒ MyConsumer
constructor
A new instance of MyConsumer.
- #timeout_read(timeout) ⇒ Object
Constructor Details
#initialize(consumer) ⇒ MyConsumer
Returns a new instance of MyConsumer.
93 94 95 |
# File 'lib/qwirk/adapter/jms/publisher.rb', line 93 def initialize(consumer) @consumer = consumer end |
Instance Attribute Details
#worker_name ⇒ Object (readonly)
Returns the value of attribute worker_name.
91 92 93 |
# File 'lib/qwirk/adapter/jms/publisher.rb', line 91 def worker_name @worker_name end |
Instance Method Details
#timeout_read(timeout) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/qwirk/adapter/jms/publisher.rb', line 97 def timeout_read(timeout) msec = (timeout * 1000).to_i if msec > 100 = @consumer.receive(msec) else #message = @consumer.receive_no_wait = @consumer.receive(100) end return nil unless .acknowledge return [.jms_correlation_id, Util.parse_response(), ['qwirk:worker']] end |