Hi everybody,

I tried akka (2.3.5) for a day now. I like the concepts a lot but found it 
particularly difficult to get started following official & unofficial 
tutorials - maybe due to the fact that the akka API changed quite a lot and 
tutorials get old quickly.
While I could find a way around most differences between docu and code, I'm 
stuck with the sample code for a SupervisorStrategy (
http://doc.akka.io/docs/akka/2.3.5/java/fault-tolerance.html).
Here I get compilation errors since Resume/Restart/Stop/Escalate are 
incompatible to Directive. Unfortunately my knowledge about 
traits&inheritance in Scala is at zero and I can't get myself out of this 
situation easily.

a) does someone have a solution for his particular problem?
b) is there a place where one can find an up-to-date documentation?

Cheers, Seb

Code Snippet from official docu:

private static SupervisorStrategy strategy =
new OneForOneStrategy(10, Duration.create("1 minute"),
new Function<Throwable, Directive>() {
@Override
public Directive apply(Throwable t) {
if (t instanceof ArithmeticException) {
return resume();
} else if (t instanceof NullPointerException) {
return restart();
} else if (t instanceof IllegalArgumentException) {
return stop();
} else {
return escalate();
}
}
});
 

-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to