Class: QRPC::Protocol::Object::Request
- Inherits:
-
Abstract::Request
- Object
- Abstract::Object
- Abstract::Request
- QRPC::Protocol::Object::Request
- Defined in:
- lib/qrpc/protocol/object/request.rb
Overview
Object request implementation.
Instance Attribute Summary
Attributes inherited from Abstract::Object
Class Method Summary collapse
-
.parse(raw) ⇒ Request
Parses the data for new object.
Instance Method Summary collapse
-
#client ⇒ Object
Returns the QRPC request client identifier.
-
#id ⇒ Object
Returns ID of the request.
-
#method ⇒ Symbol
Returns method identifier of the request.
-
#notification? ⇒ Boolean
Indicates, job is notification.
-
#params ⇒ Array
Returns method params of the request.
-
#priority ⇒ Integer
Returns the QRPC request priority.
-
#serialize ⇒ Request
Serializes object to the resultant form.
Methods inherited from Abstract::Request
Methods inherited from Abstract::Object
Constructor Details
This class inherits a constructor from QRPC::Protocol::Abstract::Request
Class Method Details
.parse(raw) ⇒ Request
Parses the data for new object.
41 42 43 |
# File 'lib/qrpc/protocol/object/request.rb', line 41 def self.parse(raw) self::new(raw.) end |
Instance Method Details
#client ⇒ Object
Returns the QRPC request client identifier.
95 96 97 |
# File 'lib/qrpc/protocol/object/request.rb', line 95 def client @options.client_id.to_s end |
#id ⇒ Object
Returns ID of the request.
59 60 61 |
# File 'lib/qrpc/protocol/object/request.rb', line 59 def id @options.id end |
#method ⇒ Symbol
Returns method identifier of the request.
68 69 70 |
# File 'lib/qrpc/protocol/object/request.rb', line 68 def method @options[:method] end |
#notification? ⇒ Boolean
Indicates, job is notification.
104 105 106 |
# File 'lib/qrpc/protocol/object/request.rb', line 104 def notification? @options.notification end |
#params ⇒ Array
Returns method params of the request.
77 78 79 |
# File 'lib/qrpc/protocol/object/request.rb', line 77 def params @options.arguments end |
#priority ⇒ Integer
Returns the QRPC request priority.
86 87 88 |
# File 'lib/qrpc/protocol/object/request.rb', line 86 def priority @options.priority end |
#serialize ⇒ Request
Serializes object to the resultant form.
50 51 52 |
# File 'lib/qrpc/protocol/object/request.rb', line 50 def serialize self end |