Class: TorqueBox::Messaging::Backgroundable::BackgroundProxy Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(receiver, options) ⇒ BackgroundProxy

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of BackgroundProxy.



181
182
183
184
# File 'lib/torquebox/messaging/backgroundable.rb', line 181

def initialize(receiver, options)
  @receiver = receiver
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (ArgumentError)


186
187
188
189
190
# File 'lib/torquebox/messaging/backgroundable.rb', line 186

def method_missing(method, *args, &block)
  @receiver.method_missing(method, *args, &block) unless @receiver.respond_to?(method)
  raise ArgumentError.new("Backgrounding a method with a block argument is not supported. If you need this feature, please file a feature request at http://issues.jboss.org/browse/TORQUE") if block_given?
  Util.publish_message(@receiver, method, args, @options)
end