fall back to unhandled() in onReceive() in docs

This commit is contained in:
Roland 2011-12-29 20:49:26 +01:00
parent 4e3e2633a4
commit d181a35fa7
11 changed files with 30 additions and 0 deletions

View file

@ -39,6 +39,8 @@ public class FaultHandlingTestBase {
public void onReceive(Object o) {
if (o instanceof Props) {
getSender().tell(getContext().actorOf((Props) o));
} else {
unhandled(o);
}
}
}
@ -49,6 +51,8 @@ public class FaultHandlingTestBase {
public void onReceive(Object o) {
if (o instanceof Props) {
getSender().tell(getContext().actorOf((Props) o));
} else {
unhandled(o);
}
}
@ -70,6 +74,8 @@ public class FaultHandlingTestBase {
state = (Integer) o;
} else if (o.equals("get")) {
getSender().tell(state);
} else {
unhandled(o);
}
}
}