Merge pull request #187 from iodb/master

add/remove InterceptHandlers with server running
This commit is contained in:
Andrea Selva
2016-07-10 11:22:44 +02:00
committed by GitHub
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);
}
}