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)
SourceInstance methods
<<(message : T)
Sourceask(target : ActorRef(M), message : M, response_type : T.class = Nil, timeout : Time::Span | Nil = nil) : Future(T) forall M, T
Sourceattach_child(child : ActorRef(U)) forall U
Sourcedeliver(message : T, sender : ActorRefBase | Nil)
Sourceextension(id : ExtensionId(U)) : U forall U
Retrieve a system extension via its ExtensionId (Akka-style). Example: ctx.extension(Movie::Remote::Remoting)
log
Sourcemailbox=(mailbox : Mailbox(T))
Sourceon_message(message : Envelope(T))
Sourceon_system_message(message : Envelope(SystemMessage))
Sourcepath
Sourcepipe(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.
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.
ref
Sourcesend_system_message(message : SystemMessage)
Sourcesender
Sourcespawn(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.
start(internal = false)
Sourcestate
Sourcestop
Sourcesupervision_config
Sourcesystem
Sourcetell(message : T)
Sourcewatch(actor : ActorRef(U)) forall U
Source