Dear Experts,
Reference : http://doc.akka.io/docs/akka/snapshot/java/lambda-fsm.html
I could see different flavors of "matchevent" .
I confused a bit in handling the state data .How state data is accessed
from actions ( Lambdas) is not very clear .
It will be great if you could help in understanding the *association of
variable data ( in the lambda ) with actual state data .*
In some cases it is very clear where one is passing data explicitly (
*Type-2* in the below code snippets ) . But in *Type-1* and *Type -3 *are
we taking state data from the actor ?
1. *Type -1 *
2. when(Error, matchEventEquals("stop", (event, data) -> {
3. // do cleanup ...
4. return stop();
5. }));
6. *Type -2 *
7. matchEvent(SetTarget.class, Uninitialized.class,
8. (setTarget, uninitialized) ->
9. stay().using(new Todo(setTarget.getRef(), new LinkedList<>()))));
10. *Type -3*
11. matchEvent(X.class, (x, data) -> {
12. log().info("Received unhandled event: " + x);
13. return stay();
regards
Mahesh
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.