Class: TorqueBox::Messaging::MarshalMessage
- Defined in:
- lib/torquebox/messaging/marshal_message.rb
Constant Summary collapse
- ENCODING =
:marshal
- JMS_TYPE =
:bytes
Constants inherited from Message
TorqueBox::Messaging::Message::DEFAULT_DECODE_ENCODING, TorqueBox::Messaging::Message::DEFAULT_ENCODE_ENCODING, TorqueBox::Messaging::Message::ENCODING_PROPERTY
Instance Attribute Summary
Attributes inherited from Message
Instance Method Summary collapse
Methods inherited from Message
__new__, class_for_encoding, encoding_map, extract_encoding_from_message, inherited, #initialize, #initialize_from_message, #method_missing, new, #populate_message_headers, #populate_message_properties, register_encoding, #respond_to?, #set_encoding
Constructor Details
This class inherits a constructor from TorqueBox::Messaging::Message
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class TorqueBox::Messaging::Message
Instance Method Details
#decode ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/torquebox/messaging/marshal_message.rb', line 30 def decode if (length = @jms_message.get_body_length) > 0 bytes = Java::byte[length].new @jms_message.read_bytes( bytes ) @jms_message.reset TorqueBox::Codecs.decode(String.from_java_bytes(bytes), ENCODING) end end |