Skip to content

Instantly share code, notes, and snippets.

@maxant
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxant/6453d5db847c0826b7df to your computer and use it in GitHub Desktop.
Save maxant/6453d5db847c0826b7df to your computer and use it in GitHub Desktop.
@Stateless
public class Service4 {
@Asynchronous
public void foo(Callback<String> c) {
// simulate some long running process
Thread.sleep(5000);
c.apply("bar");
}
public static interface Callback<T> {
void apply(T t);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment