Class: AMF::Messages::AbstractMessage
- Inherits:
-
Object
- Object
- AMF::Messages::AbstractMessage
- Defined in:
- lib/amf/messages.rb
Overview
Base class for all special AS3 response messages. Maps to flex.messaging.messages.AbstractMessage
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#time_to_live ⇒ Object
Returns the value of attribute time_to_live.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
11 12 13 |
# File 'lib/amf/messages.rb', line 11 def body @body end |
#client_id ⇒ Object
Returns the value of attribute client_id.
6 7 8 |
# File 'lib/amf/messages.rb', line 6 def client_id @client_id end |
#headers ⇒ Object
Returns the value of attribute headers.
10 11 12 |
# File 'lib/amf/messages.rb', line 10 def headers @headers end |
#message_id ⇒ Object
Returns the value of attribute message_id.
7 8 9 |
# File 'lib/amf/messages.rb', line 7 def end |
#time_to_live ⇒ Object
Returns the value of attribute time_to_live.
9 10 11 |
# File 'lib/amf/messages.rb', line 9 def time_to_live @time_to_live end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
8 9 10 |
# File 'lib/amf/messages.rb', line 8 def end |
Instance Method Details
#to_amf(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/amf/messages.rb', line 13 def to_amf( = {}) [:amf_version] ||= 3 [:serializable_names] = (self.public_methods - Object.new.public_methods).delete_if { |elm| elm =~ /to_amf|body|.*=/ } AMF.serialize(self, ) do |s| if body s.write_utf8_vr("body") s.stream << body end end end |