示例#1
0
 /** {@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;
 }
示例#2
0
 /** {@inheritDoc} */
 public void removedService(ServiceReference reference, Object service) {
   HttpService httpService = (HttpService) service;
   httpService.unregister(getServletAlias());
 }