Class: TorqueBox::Messaging::MessageProcessorProxy

Inherits:
Object
  • Object
show all
Defined in:
messaging/lib/torquebox/messaging/message_processor.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (MessageProcessorProxy) initialize(group)

Returns a new instance of MessageProcessorProxy



107
108
109
110
111
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 107

def initialize(group)
  @group = group

  raise "Cannot create MessageProcessorProxy for non-existing MessageProcessorGroup" if @group.nil?
end

Instance Attribute Details

- (Object) :class_name (readonly)

Returns the value of attribute :class_name



113
114
115
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 113

def :class_name
  @:class_name
end

- (Object) :destination_name (readonly)

Returns the value of attribute :destination_name



113
114
115
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 113

def :destination_name
  @:destination_name
end

Instance Method Details

- (Object) class_name



154
155
156
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 154

def class_name
  @group.message_processor_class.name
end

- (Object) concurrency



132
133
134
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 132

def concurrency
  @group.concurrency
end

- (Object) concurrency=(size)



119
120
121
122
123
124
125
126
127
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 119

def concurrency=(size)
  raise "Setting concurrency for '#{name}' to value < 0 is not allowed. You tried '#{size}'." if size < 0

  return size if size == @group.concurrency

  @group.update_concurrency(size)

  concurrency
end

- (Object) destination_name



146
147
148
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 146

def destination_name
  @group.destination_name
end

- (Boolean) durable?

Returns:

  • (Boolean)


172
173
174
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 172

def durable?
  @group.durable
end

- (Object) message_selector



164
165
166
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 164

def message_selector
  @group.message_selector
end

- (Object) name



139
140
141
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 139

def name
  @group.name
end

- (Object) start



194
195
196
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 194

def start
  @group.start
end

- (Boolean) started?

Returns:

  • (Boolean)


188
189
190
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 188

def started?
  @group.status.eql?("STARTED")
end

- (Object) stop



200
201
202
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 200

def stop
  @group.stop
end

- (Boolean) synchronous?

Returns:

  • (Boolean)


180
181
182
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 180

def synchronous?
  @group.synchronous
end

- (Object) to_s



204
205
206
# File 'messaging/lib/torquebox/messaging/message_processor.rb', line 204

def to_s
  "<MessageProcessorProxy: #{name}>"
end