Class: ActionService::Protocol::ProtocolRequest

Inherits:
AbstractProtocolMessage show all
Defined in:
lib/action_service/protocol/abstract.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractProtocolMessage

#return_signature, #signature, #type

Instance Method Summary collapse

Methods inherited from AbstractProtocolMessage

#check_compatibility, #check_parameter_types, #checked?

Constructor Details

#initialize(protocol, raw_body, service_name, public_method_name, content_type, options = {}) ⇒ ProtocolRequest

Returns a new instance of ProtocolRequest.



91
92
93
94
95
96
97
98
99
# File 'lib/action_service/protocol/abstract.rb', line 91

def initialize(protocol, raw_body, service_name, public_method_name, content_type, options={})
  super(options)
  @protocol = protocol
  @raw_body = raw_body
  @service_name = service_name
  @public_method_name = public_method_name
  @content_type = content_type
  @values = nil
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



88
89
90
# File 'lib/action_service/protocol/abstract.rb', line 88

def content_type
  @content_type
end

#protocolObject (readonly)

Returns the value of attribute protocol.



83
84
85
# File 'lib/action_service/protocol/abstract.rb', line 83

def protocol
  @protocol
end

#public_method_nameObject

Returns the value of attribute public_method_name.



87
88
89
# File 'lib/action_service/protocol/abstract.rb', line 87

def public_method_name
  @public_method_name
end

#raw_bodyObject (readonly)

Returns the value of attribute raw_body.



84
85
86
# File 'lib/action_service/protocol/abstract.rb', line 84

def raw_body
  @raw_body
end

#service_nameObject

Returns the value of attribute service_name.



86
87
88
# File 'lib/action_service/protocol/abstract.rb', line 86

def service_name
  @service_name
end

#valuesObject

Returns the value of attribute values.



89
90
91
# File 'lib/action_service/protocol/abstract.rb', line 89

def values
  @values
end

Instance Method Details

#marshal(return_value) ⇒ Object



105
106
107
# File 'lib/action_service/protocol/abstract.rb', line 105

def marshal(return_value)
  @protocol.marshal_response(self, return_value)
end

#unmarshalObject



101
102
103
# File 'lib/action_service/protocol/abstract.rb', line 101

def unmarshal
  @values ||= @protocol.unmarshal_request(self)
end