Files

Class/Module Index [+]

Quicksearch

ActiveMessaging::Adapters::Stomp::Message

Public Class Methods

new(msg) click to toggle source
# File lib/activemessaging/adapters/stomp.rb, line 189
def initialize(msg)
  super(msg.body, msg.headers['message-id'], msg.headers, msg.headers['destination'])
end

Public Instance Methods

matches_subscription?(subscription) click to toggle source
# File lib/activemessaging/adapters/stomp.rb, line 193
def matches_subscription?(subscription)
  # if the subscription has been specified in the headers, rely on this
  if self.headers['subscription'] && subscription.subscribe_headers['id']
    self.headers['subscription'].to_s == subscription.subscribe_headers['id'].to_s
    
  # see if the destination uses a wildcard representation
  elsif subscription.destination.wildcard
    self.destination.to_s =~ subscription.destination.wildcard
    
  # no subscription id? no wildcard? use the name of the destination as a straight match
  else
    self.destination.to_s == subscription.destination.value.to_s
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.