| ReceiveActorReceiveT Method (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.
Remarks Remarks Note that handlers registered prior to this may have handled the message already.
In that case, this handler will not be invoked.
Namespace:
Akka.Actor
Assembly:
Akka (in Akka.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax protected void Receive<T>(
Action<T> handler,
Predicate<T> shouldHandle = null
)
member Receive :
handler : Action<'T> *
?shouldHandle : Predicate<'T>
(* Defaults:
let _shouldHandle = defaultArg shouldHandle null
*)
-> unit
Parameters
- handler
- Type: SystemActionT
The message handler that is invoked for incoming messages of the specified type T - shouldHandle (Optional)
- Type: SystemPredicateT
When not null it is used to determine if the message matches.
Type Parameters
- T
- The type of the message
Exceptions See Also