Class: DripDrop::ZMQXRepHandler::Response

Inherits:
DripDrop::ZMQBaseHandler show all
Defined in:
lib/dripdrop/handlers/zeromq.rb

Instance Attribute Summary collapse

Attributes inherited from DripDrop::ZMQBaseHandler

#connection

Instance Method Summary collapse

Methods inherited from DripDrop::ZMQBaseHandler

#add_connection, #address, #on_receive, #on_recv, #post_setup, #read_connection, #write_connection

Methods inherited from BaseHandler

#handle_error, #on_error, #print_exception

Constructor Details

#initialize(xrep, identities, seq, message_class) ⇒ Response

Returns a new instance of Response.



246
247
248
249
250
251
# File 'lib/dripdrop/handlers/zeromq.rb', line 246

def initialize(xrep,identities,seq,message_class)
  @xrep = xrep
  @seq  = seq
  @identities    = identities
  @message_class = message_class
end

Instance Attribute Details

#identitiesObject

Returns the value of attribute identities.



244
245
246
# File 'lib/dripdrop/handlers/zeromq.rb', line 244

def identities
  @identities
end

#seqObject

Returns the value of attribute seq.



244
245
246
# File 'lib/dripdrop/handlers/zeromq.rb', line 244

def seq
  @seq
end

#xrepObject

Returns the value of attribute xrep.



244
245
246
# File 'lib/dripdrop/handlers/zeromq.rb', line 244

def xrep
  @xrep
end

Instance Method Details

#send_message(message) ⇒ Object



253
254
255
256
# File 'lib/dripdrop/handlers/zeromq.rb', line 253

def send_message(message)
  dd_message = dd_messagify(message,@message_class)
  @xrep.send_message(dd_message,identities,seq)
end