Class: DCell::Message::Find

Inherits:
DCell::Message show all
Defined in:
lib/dcell/messages.rb

Overview

Query a node for the address of an actor

Instance Attribute Summary collapse

Attributes inherited from DCell::Message

#id

Instance Method Summary collapse

Constructor Details

#initialize(sender, name) ⇒ Find

Returns a new instance of Find.



27
28
29
30
# File 'lib/dcell/messages.rb', line 27

def initialize(sender, name)
  super()
  @sender, @name = sender, name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



25
26
27
# File 'lib/dcell/messages.rb', line 25

def name
  @name
end

#senderObject (readonly)

Returns the value of attribute sender.



25
26
27
# File 'lib/dcell/messages.rb', line 25

def sender
  @sender
end

Instance Method Details

#dispatchObject



32
33
34
# File 'lib/dcell/messages.rb', line 32

def dispatch
  @sender << SuccessResponse.new(@id, Celluloid::Actor[@name])
end