pekko/fun-test-java/src/test/java/se/scalablesolutions/akka/api/Foo.java

31 lines
706 B
Java
Raw Normal View History

package se.scalablesolutions.akka.api;
import com.google.inject.Inject;
import se.scalablesolutions.akka.annotation.oneway;
2009-07-27 21:21:28 +02:00
public class Foo extends se.scalablesolutions.akka.serialization.Serializable.JavaJSON<Foo> {
@Inject
private Bar bar;
2009-07-27 21:21:28 +02:00
public Foo body() { return this; }
public Bar getBar() {
return bar;
}
public String foo(String msg) {
return msg + "return_foo ";
}
public void bar(String msg) {
bar.bar(msg);
}
public String longRunning() {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
}
return "test";
}
public String throwsException() {
if (true) throw new RuntimeException("expected");
return "test";
}
}