Class: Qwirk::Adapter::JMS::Util
- Inherits:
-
Object
- Object
- Qwirk::Adapter::JMS::Util
- Defined in:
- lib/qwirk/adapter/jms/util.rb
Class Method Summary collapse
Class Method Details
.create_message(session, marshaled_object, marshal_type) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/qwirk/adapter/jms/util.rb', line 6 def (session, marshaled_object, marshal_type) case marshal_type when :text session.(marshaled_object) when :bytes msg = session.() msg.data = marshaled_object msg else raise "Invalid marshal type: #{marshal_type}" end end |
.parse_response(message) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/qwirk/adapter/jms/util.rb', line 18 def parse_response() if error_yaml = ['qwirk:exception'] return Qwirk::RemoteException.unmarshal(error_yaml) end marshaler = Qwirk::MarshalStrategy.find(['qwirk:marshal'] || WorkerConfig.default_marshal_sym) return marshaler.unmarshal(.data) end |