Class: MQRPC::ResponseMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/mqrpc/message.rb

Overview

class DummyMessage

Direct Known Subclasses

Messages::PingResponse

Instance Method Summary collapse

Methods inherited from Message

#age, #generate_id!, inherited, new_from_data, #to_json

Methods included from BindToHash

#argument, #header

Constructor Details

#initialize(source_request = nil) ⇒ ResponseMessage

Returns a new instance of ResponseMessage.



119
120
121
122
123
124
125
126
127
128
# File 'lib/mqrpc/message.rb', line 119

def initialize(source_request=nil)
  super()

  # Copy the request id if we are given a source_request
  if source_request.is_a?(RequestMessage)
    self.in_reply_to = source_request.id
    self.delayable = source_request.delayable
  end
  self.args = Hash.new
end

Instance Method Details

#success?Boolean

Report the success of the request this response is for. Should be implemented by subclasses.

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


132
133
134
# File 'lib/mqrpc/message.rb', line 132

def success?
  raise NotImplementedError
end