public static void main(String[] args) {
try {
System.out.println("\"Async resources\" Jersey Example App");
final HttpServer server = GrizzlyHttpServerFactory.createHttpServer(BASE_URI, create());
System.out.println(String.format(
"Application started.\n"
+ "To test simple, non-blocking asynchronous messaging resource, try %s%s\n"
+ "To test blocking version of asynchronous messaging resource, try %s%s\n"
+ "To test long-running asynchronous operation resource, try %s%s\n"
+ "Hit enter to stop it...",
BASE_URI, ASYNC_MESSAGING_FIRE_N_FORGET_PATH,
BASE_URI, ASYNC_MESSAGING_BLOCKING_PATH,
BASE_URI, ASYNC_LONG_RUNNING_OP_PATH));
System.in.read();
server.stop();
} catch (IOException ex) {
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
}
}