Class: QRPC::Protocol::Abstract::Request Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/qrpc/protocol/abstract/request.rb

Overview

This class is abstract.

Abstract request implementation.

Since:

  • 0.9.0

Direct Known Subclasses

JsonRpc::Request, Object::Request

Instance Attribute Summary

Attributes inherited from Object

#options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#assign_options, #serialize

Constructor Details

#initialize(init = { }) ⇒ Request

This method is abstract.

Constructor.

Parameters:

  • init (Hash) (defaults to: { })

    initial options

Since:

  • 0.9.0



44
45
46
47
48
49
# File 'lib/qrpc/protocol/abstract/request.rb', line 44

def initialize(init = { })
    super(init)
    if self.instance_of? Request
        not_implemented
    end
end

Class Method Details

.parse(raw) ⇒ Request

This method is abstract.

Parses the data for new object.

Parameters:

  • raw (String)

    raw data

Returns:

  • (Request)

    new request according to data

Since:

  • 0.9.0



59
60
61
# File 'lib/qrpc/protocol/abstract/request.rb', line 59

def self.parse(raw)
    not_implemented
end

Instance Method Details

#clientObject

Returns the QRPC request client identifier.

Returns:

  • Object

Since:

  • 0.9.0



110
111
112
# File 'lib/qrpc/protocol/abstract/request.rb', line 110

def client
    not_implemented
end

#idObject

This method is abstract.

Returns ID of the request.

Returns:

Since:

  • 0.9.0



70
71
72
# File 'lib/qrpc/protocol/abstract/request.rb', line 70

def id
    not_implemented
end

#methodObject

This method is abstract.

Returns method identifier of the request.

Returns:

  • Symbol

Since:

  • 0.9.0



81
82
83
# File 'lib/qrpc/protocol/abstract/request.rb', line 81

def method
    not_implemented
end

#notification?Boolean

Indicates, job is notification.

Returns:

  • (Boolean)

    Boolean

Since:

  • 0.9.0



119
120
121
# File 'lib/qrpc/protocol/abstract/request.rb', line 119

def notification?
    not_implemented
end

#paramsObject

This method is abstract.

Returns method params of the request.

Returns:

  • Array

Since:

  • 0.9.0



92
93
94
# File 'lib/qrpc/protocol/abstract/request.rb', line 92

def params
    not_implemented
end

#priorityObject

Returns the QRPC request priority.

Returns:

  • Integer

Since:

  • 0.9.0



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

def priority
    not_implemented
end