July 2018
Intermediate to advanced
116 pages
2h 41m
English
CompletionCallback is the first callback. It is called by the JAX-RS runtime once the request is completed. The only method you need to implement is onComplete. In case of an error, you will be passed the throwable error and the "Completed processing." parameter, and we can do the required logic in here:
static class LoggingCompletionCallback implements CompletionCallback { @Override public void onComplete(Throwable throwable) { LOGGER.log(Level.INFO, "Completed processing.", throwable); } }