Class: ActiveMessaging::Filter

Inherits:
Object
  • Object
show all
Includes:
MessageSender
Defined in:
lib/activemessaging/filter.rb

Direct Known Subclasses

TraceFilter

Instance Method Summary collapse

Methods included from MessageSender

included, #publish, #publish_with_reset, #receive

Instance Method Details

#loggerObject

give filters easy access to the logger



9
10
11
12
# File 'lib/activemessaging/filter.rb', line 9

def logger()
  @@logger = ActiveMessaging.logger unless defined?(@@logger)
  @@logger
end

#process(message, routing) ⇒ Object

if you raise a StopProcessingException, it will cause this to be the last filter to be processed, and will prevent any further processing

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/activemessaging/filter.rb', line 24

def process(message, routing)
  raise NotImplementedError.new("Implement the process method in your own filter class that extends ActiveMessaging::Filter")
end