class

Movie::ActorContext(T)

Inherits Movie::AbstractActorContext < Reference < Object

Constructors

new(behavior : AbstractBehavior(T), ref : ActorRef(T), system : AbstractActorSystem, restart_strategy : RestartStrategy, supervision_config : SupervisionConfig = SupervisionConfig.default, path : ActorPath | Nil = nil)
Source

Instance methods

<<(message : T)
Source
ask(target : ActorRef(M), message : M, response_type : T.class = Nil, timeout : Time::Span | Nil = nil) : Future(T) forall M, T
Source
attach_child(child : ActorRef(U)) forall U
Source
deliver(message : T, sender : ActorRefBase | Nil)
Source
extension(id : ExtensionId(U)) : U forall U

Retrieve a system extension via its ExtensionId (Akka-style). Example: ctx.extension(Movie::Remote::Remoting)

Source
mailbox=(mailbox : Mailbox(T))
Source
on_message(message : Envelope(T))
Source
on_system_message(message : Envelope(SystemMessage))
Source
path
Source
pipe(future : Future(U), reply_to : ActorRef(V), success : U -> V, failure : Exception -> V) : Nil forall U, V

Pipe a future result to a target actor using custom success/failure mappers.

Source
pipe(future : Future(U), reply_to : ActorRef(Pipe::Message(U))) : Nil forall U

Pipe a future result to a target actor as Pipe::Success or Pipe::Failure.

Source
send_system_message(message : SystemMessage)
Source
sender
Source
spawn(behavior : AbstractBehavior(U), restart_strategy : RestartStrategy = @restart_strategy, supervision_config : SupervisionConfig = @supervision_config, name : String | Nil = nil) : ActorRef(U) forall U

Spawns a child actor under this actor's supervision. If name is provided, the child gets a hierarchical path: {parent_path}/{name} If name is nil, generates a unique name based on actor ID.

Source
start(internal = false)
Source
state
Source
stop
Source
supervision_config
Source
system
Source
tell(message : T)
Source
watch(actor : ActorRef(U)) forall U
Source

Nested types