Class: Qwirk::Adapter::JMS::WorkerConfig

Inherits:
Base::ExpandingWorkerConfig
  • Object
show all
Defined in:
lib/qwirk/adapter/jms/worker_config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connectionObject (readonly)

bean_reader :queue_size, :integer, ‘Current count of messages in the queue’, :config_item => true



9
10
11
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 9

def connection
  @connection
end

#destinationObject (readonly)

bean_reader :queue_size, :integer, ‘Current count of messages in the queue’, :config_item => true



9
10
11
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 9

def destination
  @destination
end

#persistentObject (readonly)

bean_reader :queue_size, :integer, ‘Current count of messages in the queue’, :config_item => true



9
10
11
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 9

def persistent
  @persistent
end

#time_to_liveObject (readonly)

bean_reader :queue_size, :integer, ‘Current count of messages in the queue’, :config_item => true



9
10
11
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 9

def time_to_live
  @time_to_live
end

Class Method Details

.default_marshal_symObject



11
12
13
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 11

def self.default_marshal_sym
  :ruby
end

Instance Method Details

#create_workerObject



25
26
27
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 25

def create_worker
  Worker.new(self)
end

#initObject



15
16
17
18
19
20
21
22
23
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 15

def init
  super
  @connection   = self.adapter_factory.adapter_info
  @destination  = {:queue_name => self.queue_name} if self.queue_name
  @destination  = {:topic_name => self.topic_name} if self.topic_name
  # Time in msec until the message gets discarded, should be more than the timeout on the requestor side
  @time_to_live = self.response_options[:time_to_live]
  @persistent   = self.response_options[:persistent]
end

#stopObject



29
30
31
32
33
# File 'lib/qwirk/adapter/jms/worker_config.rb', line 29

def stop
  Qwirk.logger.debug { "Stopping #{self}" }
  @connection.close
  super
end