Improve Future API when using UntypedActors, and add overloads for Java API
This commit is contained in:
parent
89f2bf3cb9
commit
67ead66b32
3 changed files with 66 additions and 13 deletions
|
|
@ -3,7 +3,8 @@ package akka.dispatch;
|
|||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import java.util.concurrent.Callable;
|
||||
import scala.runtime.AbstractFunction1;
|
||||
import akka.japi.Function;
|
||||
import akka.japi.Procedure;
|
||||
import scala.Some;
|
||||
import scala.Right;
|
||||
import static akka.dispatch.Futures.future;
|
||||
|
|
@ -17,7 +18,7 @@ import static akka.dispatch.Futures.future;
|
|||
}
|
||||
});
|
||||
|
||||
Future f2 = f1.map(new AbstractFunction1<String, String>() {
|
||||
Future f2 = f1.map(new Function<String, String>() {
|
||||
public String apply(String s) {
|
||||
return s + " World";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue