add/remove InterceptHandlers with server running

This commit is contained in:
IODBEEC1
2016-07-09 09:09:57 +02:00
parent d5399995c3
commit ed9d91e527
5 changed files with 67 additions and 1 deletions
@@ -155,4 +155,19 @@ public class Server {
m_initialized = false;
LOG.info("Server stopped");
}
public boolean addInterceptHandler(InterceptHandler interceptHandler) {
if (!m_initialized) {
throw new IllegalStateException("Can't register interceptors on a server that is not yet started");
}
return m_processor.addInterceptHandler(interceptHandler);
}
public boolean removeInterceptHandler(InterceptHandler interceptHandler) {
if (!m_initialized) {
throw new IllegalStateException("Can't deregister interceptors from a server that is not yet started");
}
return m_processor.removeInterceptHandler(interceptHandler);
}
}