class Concurrent::Actor::Envelope

Attributes

address[R]

@!attribute [r] message

@return [Object] a message

@!attribute [r] future

@return [Edge::Future] a future which becomes resolved after message is processed

@!attribute [r] sender

@return [Reference, Thread] an actor or thread sending the message

@!attribute [r] address

@return [Reference] where this message will be delivered
future[R]

@!attribute [r] message

@return [Object] a message

@!attribute [r] future

@return [Edge::Future] a future which becomes resolved after message is processed

@!attribute [r] sender

@return [Reference, Thread] an actor or thread sending the message

@!attribute [r] address

@return [Reference] where this message will be delivered
message[R]

@!attribute [r] message

@return [Object] a message

@!attribute [r] future

@return [Edge::Future] a future which becomes resolved after message is processed

@!attribute [r] sender

@return [Reference, Thread] an actor or thread sending the message

@!attribute [r] address

@return [Reference] where this message will be delivered
sender[R]

@!attribute [r] message

@return [Object] a message

@!attribute [r] future

@return [Edge::Future] a future which becomes resolved after message is processed

@!attribute [r] sender

@return [Reference, Thread] an actor or thread sending the message

@!attribute [r] address

@return [Reference] where this message will be delivered

Public Class Methods

new(message, future, sender, address) click to toggle source
# File lib/concurrent/actor/envelope.rb, line 17
def initialize(message, future, sender, address)
  @message = message
  @future  = Type! future, Edge::CompletableFuture, NilClass
  @sender  = Type! sender, Reference, Thread
  @address = Type! address, Reference
end

Public Instance Methods

address_path() click to toggle source
# File lib/concurrent/actor/envelope.rb, line 32
def address_path
  address.path
end
reject!(error) click to toggle source
# File lib/concurrent/actor/envelope.rb, line 36
def reject!(error)
  future.fail error unless future.nil?
end
sender_path() click to toggle source
# File lib/concurrent/actor/envelope.rb, line 24
def sender_path
  if sender.is_a? Reference
    sender.path
  else
    sender.to_s
  end
end