/** {@inheritDoc} */ public Object addingService(ServiceReference reference) { HttpService service = (HttpService) context.getService(reference); try { service.registerServlet( getServletAlias(), new JolokiaServlet(context, restrictor), getConfiguration(), getHttpContext()); } catch (ServletException e) { logError("Servlet Exception: " + e, e); } catch (NamespaceException e) { logError("Namespace Exception: " + e, e); } return service; }
/** {@inheritDoc} */ public void removedService(ServiceReference reference, Object service) { HttpService httpService = (HttpService) service; httpService.unregister(getServletAlias()); }