Here are the examples of the java api play.mvc.Results.async() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
18
Source : AsyncController.java
with Apache License 2.0
from thefreebit
with Apache License 2.0
from thefreebit
public static Result message() {
return Results.async(Akka.future(new Callable<Result>() {
@Override
public Result call() {
try {
SECONDS.sleep(1);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
new CreateTraceEntry().traceEntryMarker();
return Results.ok("Hi!");
}
}));
}