IActorContext Interface |
Namespace: Akka.Actor
The IActorContext type exposes the following members.
Name | Description | |
---|---|---|
Dispatcher |
The dispatcher this actor is running on
| |
Parent |
Gets the IActorRef of the parent of the current actor.
| |
Props | ||
ReceiveTimeout |
Gets the inactivity deadline timeout set using SetReceiveTimeout(NullableTimeSpan).
| |
Self |
Gets the IActorRef belonging to the current actor.
| |
Sender | ||
System |
Gets a reference to the ActorSystem to which this actor belongs.
Remarks
This property is how you can get access to the IScheduler and other parts
of Akka.NET from within an actor instance.
|
Name | Description | |
---|---|---|
ActorOf |
Create new actor as child of this context with the given name, which must
not start with "$". If the given name is already in use,
and InvalidActorNameException is thrown.
See Props for details on how to obtain a Props object.
(Inherited from IActorRefFactory.) | |
ActorSelection(String) |
Construct an ActorSelection from the given path, which is
parsed for wildcards (these are replaced by regular expressions
internally). No attempt is made to verify the existence of any part of
the supplied path, it is recommended to send a message and gather the
replies in order to resolve the matching set of actors.
(Inherited from IActorRefFactory.) | |
ActorSelection(ActorPath) |
Construct an ActorSelection from the given path, which is
parsed for wildcards (these are replaced by regular expressions
internally). No attempt is made to verify the existence of any part of
the supplied path, it is recommended to send a message and gather the
replies in order to resolve the matching set of actors.
(Inherited from IActorRefFactory.) | |
Become |
Changes the actor's behavior and replaces the current receive handler with the specified handler.
| |
BecomeStacked |
Changes the actor's behavior and replaces the current receive handler with the specified handler.
The current handler is stored on a stack, and you can revert to it by calling UnbecomeStacked Remarks Please note, that in order to not leak memory, make sure every call to BecomeStacked(Receive)
is matched with a call to UnbecomeStacked. | |
Child |
Retrieves a child actor with the specified name, if it exists.
If the child with the given name cannot be found,
then Nobody will be returned instead.
| |
GetChildren |
Gets all of the children that belong to this actor.
If this actor has no children,
an empty collection of IActorRef is returned instead.
| |
SetReceiveTimeout | Defines the inactivity timeout after which the sending of a ReceiveTimeout message is triggered. When specified, the receive function should be able to handle a ReceiveTimeout message. Please note that the receive timeout might fire and enqueue the ReceiveTimeout message right after another message was enqueued; hence it is not guaranteed that upon reception of the receive timeout there must have been an idle period beforehand as configured via this method. Once set, the receive timeout stays in effect (i.e. continues firing repeatedly after inactivity periods). Pass in null to switch off this feature. | |
Stop |
Issues a stop command to the provided IActorRef, which will cause that actor
to terminate.
| |
UnbecomeStacked |
Changes the actor's behavior and replaces the current receive handler with the previous one on the behavior stack.
Remarks In order to store an actor on the behavior stack, a call to BecomeStacked(Receive) must have been made
prior to this call | |
Unwatch |
Stops monitoring the subject for termination.
(Inherited from ICanWatch.) | |
Watch |
Monitors the specified actor for termination. When the subject terminates
the instance watching will receive a Terminated message.
(Inherited from ICanWatch.)Remarks Note that if the Terminated message isn't handled by the actor,
by default the actor will crash by throwing a DeathPactException. To change
the default behavior, override Unhandled(Object).
|
Name | Description | |
---|---|---|
ActorOf(ActionIActorDsl, String) | Overloaded.
TBD
(Defined by ActExtensions.) | |
ActorOf(ActionIActorDsl, IActorContext, String) | Overloaded.
TBD
(Defined by ActExtensions.) | |
ActorOfTActor(String) | Overloaded.
TBD
(Defined by ActorRefFactoryExtensions.) | |
ActorSelection |
Construct an ActorSelection from the given string representing a path
relative to the given target. This operation has to create all the
matching magic, so it is preferable to cache its result if the
intention is to send messages frequently.
(Defined by ActorRefFactoryExtensions.) | |
CreateStash(Type) | Overloaded.
TBD
(Defined by StashFactory.) | |
CreateStash(IActorStash) | Overloaded.
TBD
(Defined by StashFactory.) | |
CreateStashT | Overloaded.
TBD
(Defined by StashFactory.) | |
DI |
Creates an adapter used to generate Props configuration objects using the DI extension using a given actor context.
(Defined by Extensions.) | |
GetLogger |
Creates a new logging adapter using the specified context's event stream.
(Defined by Logging.) | |
LoadFailureDetector |
Loads an instantiates a given FailureDetector implementation. The class to be loaded must have a constructor
that accepts a Config and an EventStream parameter. Will throw ConfigurationException
if the implementation cannot be loaded.
(Defined by FailureDetectorLoader.) | |
Materializer | Creates a ActorMaterializer which will execute every step of a transformation pipeline within its own ActorBase. The required IActorRefFactory (which can be either an ActorSystem or an IActorContext) will be used to create one actor that in turn creates actors for the transformation steps. The materializer's ActorMaterializerSettings will be obtained from the configuration of the context's underlying ActorSystem. The namePrefix is used as the first part of the names of the actors running the processing steps. The default namePrefix is "flow". The actor names are built up of namePrefix-flowNumber-flowStepNumber-stepName. |