Class: TorqueBox::Stomp::Message

Inherits:
Object
  • Object
show all
Defined in:
stomp/lib/torquebox/stomp/message.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) new(body, headers = {})



22
23
24
25
26
27
28
29
30
31
# File 'stomp/lib/torquebox/stomp/message.rb', line 22

def self.new(body, headers={})
  message = org.projectodd.stilts.stomp::StompMessages.createStompMessage()
  message.content_as_string = body

  headers.each do |k,v|
    message.headers[k.to_s] = v.to_s
  end

  message
end