ReceiveActorReceive Method (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.
Remarks
RemarksNote that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked.
Namespace: Akka.ActorAssembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntaxprotected void Receive(
Type messageType,
Func<Object, bool> handler
)
Protected Sub Receive (
messageType As Type,
handler As Func(Of Object, Boolean)
)
protected:
void Receive(
Type^ messageType,
Func<Object^, bool>^ handler
)
member Receive :
messageType : Type *
handler : Func<Object, bool> -> unit
Parameters
- messageType
- Type: SystemType
The type of the message - handler
- Type: SystemFuncObject, Boolean
The message handler that is invoked for incoming messages of the
specified type [!:messageType]. It should return trueif it handled/matched
the message; false otherwise.
See Also