ReceiveActor Class |
[Missing <summary> documentation for "T:Akka.Actor.ReceiveActor"]
Namespace: Akka.Actor
The ReceiveActor type exposes the following members.
Name | Description | |
---|---|---|
![]() | ReceiveActor | Initializes a new instance of the ReceiveActor class |
Name | Description | |
---|---|---|
![]() | AroundPostRestart |
Can be overridden to intercept calls to `postRestart`. Calls `postRestart` by default.
(Inherited from ActorBase.) |
![]() | AroundPostStop |
Can be overridden to intercept calls to `postStop`. Calls `postStop` by default..
(Inherited from ActorBase.) |
![]() | AroundPreRestart |
Can be overridden to intercept calls to `preRestart`. Calls `preRestart` by default.
(Inherited from ActorBase.) |
![]() | AroundPreStart |
Can be overridden to intercept calls to `preStart`. Calls `preStart` by default.
(Inherited from ActorBase.) |
![]() | AroundReceive | (Inherited from ActorBase.) |
![]() | Become(Action, Boolean) | |
![]() | Become(Receive, Boolean) |
Changes the Actor's behavior to become the new Receive handler.
This method acts upon the behavior stack as follows:
(Inherited from ActorBase.)if discardOld==true it will replace the current behavior (i.e. the top element) if discardOld==false it will keep the current behavior and push the given one atop The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an Unbecome) |
![]() | Become(UntypedReceive, Boolean) |
Changes the Actor's behavior to become the new Receive(Object) handler.
This method acts upon the behavior stack as follows:
(Inherited from UntypedActor.)if discardOld==true it will replace the current behavior (i.e. the top element) if discardOld==false it will keep the current behavior and push the given one atop The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an Unbecome) |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnReceive | (Overrides UntypedActorOnReceive(Object).) |
![]() | PostRestart |
User overridable callback: By default it calls `preStart()`.
Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.
(Inherited from ActorBase.) |
![]() | PostStop |
User overridable callback.
Is called asynchronously after 'actor.stop()' is invoked.
Empty default implementation.
(Inherited from ActorBase.) |
![]() | PreRestart |
User overridable callback: '''By default it disposes of all children and then calls `postStop()`.'''
Is called on a crashed Actor right BEFORE it is restarted to allow clean
up of resources before Actor is terminated.
(Inherited from ActorBase.) |
![]() | PreStart |
User overridable callback.
Is called when an Actor is started.
Actors are automatically started asynchronously when created.
Empty default implementation.
(Inherited from ActorBase.) |
![]() | Receive(Object) | (Inherited from UntypedActor.) |
![]() | Receive(Type, FuncObject, Boolean) |
Registers a handler for incoming messages of the specified [!:messageType].
The handler should return true if it has handled the message.
If the handler returns true no more handlers will be tried; otherwise the next registered handler will be tried.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | Receive(Type, ActionObject, PredicateObject) |
Registers a handler for incoming messages of the specified [!:messageType].
If shouldHandle!=null then it must return true before a message is passed to handler.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | Receive(Type, PredicateObject, ActionObject) |
Registers a handler for incoming messages of the specified [!:messageType].
If shouldHandle!=null then it must return true before a message is passed to handler.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | ReceiveT(FuncT, Boolean) |
Registers a handler for incoming messages of the specified type T.
The handler should return true if it has handled the message.
If the handler returns true no more handlers will be tried; otherwise the next registered handler will be tried.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | ReceiveT(ActionT, PredicateT) |
Registers a handler for incoming messages of the specified type T.
If shouldHandle!=null then it must return true before a message is passed to handler.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | ReceiveT(PredicateT, ActionT) |
Registers a handler for incoming messages of the specified type T.
If shouldHandle!=null then it must return true before a message is passed to handler.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | ReceiveAny |
Registers a handler for incoming messages of any type.
![]() This method may only be called when constructing the actor or from Become(Action, Boolean). ![]() Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked. |
![]() | 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. |
![]() | SupervisorStrategy | (Inherited from ActorBase.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | Unbecome |
Reverts the Actor behavior to the previous one on the behavior stack.
(Inherited from ActorBase.) |
![]() | Unhandled |
Is called when a message isn't handled by the current behavior of the actor
by default it fails with either a DeathPactException (in
case of an unhandled Terminated message) or publishes an UnhandledMessage
to the actor's system's EventStream (Inherited from ActorBase.) |
Name | Description | |
---|---|---|
![]() | AsInstanceOfT | (Defined by Extensions.) |
![]() | Match |
Matches the specified target.
(Defined by PatternMatch.) |
Name | Description | |
---|---|---|
![]() | Self |
Gets the self ActorRef
(Inherited from ActorBase.) |
![]() | Sender |
Gets the sending ActorRef of the current message
(Inherited from ActorBase.) |