@Override public int getSize() { return delegate.getSize(); }
@Override public int getSize() { return delegate.getSize(); }
/** * Unregisters a RESTEasy servlet. * @param alias alias */ public void unregisterRESTEasyServlet(String alias) { OsgiRESTEasyServletWrapper servlet = getRegisteredRESTEasyServlet(alias); if (servlet == null) { throw new IllegalArgumentException("No RESTEasy servlet is registered for the alias '" + alias + "'"); } if (servlet.getDispatcher().getRegistry().getSize() != 0) { throw new IllegalStateException("Cannot remove RESTEasy Servlet '" + alias + "' - registry is not empty"); } _httpService.unregister(alias); _servlets.remove(alias); }
/** * Unregisters a RESTEasy servlet. * @param alias alias */ public void unregisterRESTEasyServlet(String alias) { OsgiRESTEasyServletWrapper servlet = getRegisteredRESTEasyServlet(alias); if (servlet == null) { throw new IllegalArgumentException("No RESTEasy servlet is registered for the alias '" + alias + "'"); } if (servlet.getDispatcher().getRegistry().getSize() != 0) { throw new IllegalStateException("Cannot remove RESTEasy Servlet '" + alias + "' - registry is not empty"); } _httpService.unregister(alias); _servlets.remove(alias); }
@Override public void stop() { _registry.unregisterRESTEasyResources(_alias, _classes); OsgiRESTEasyServletWrapper servlet = _registry.getRegisteredRESTEasyServlet(_alias); if (servlet != null && servlet.getDispatcher().getRegistry().getSize() == 0) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Unregistering RESTEasy servlet with an alias '" + _alias + "'"); } _registry.unregisterRESTEasyServlet(_alias); } }
@Override public void stop() { _registry.unregisterRESTEasyResources(_alias, _classes); OsgiRESTEasyServletWrapper servlet = _registry.getRegisteredRESTEasyServlet(_alias); if (servlet != null && servlet.getDispatcher().getRegistry().getSize() == 0) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Unregistering RESTEasy servlet with an alias '" + _alias + "'"); } _registry.unregisterRESTEasyServlet(_alias); } }
/** * {@inheritDoc} */ public void stop() { if ((_context != null) && _context.isStarted()) { Registry registry = (Registry)_context.getServletContext().getAttribute(Registry.class.getName()); if (registry != null) { // Remove registrations for (Class<?> clazz : _classes) { LOG.debug("Stopping ... " + clazz); registry.removeRegistrations(clazz); } // Destroy the web context unless if it is default if ((registry.getSize() == 0) && (!_context.getPath().equals("/"))) { try { Container container = _context.getParent(); container.removeChild(_context); _context.stop(); _context.destroy(); LOG.info("Destroyed RESTEasy context " + _context.getPath()); } catch (Exception e) { ExtensionLogger.ROOT_LOGGER.unableToDestroyWebContext(_context.getPath(), e); } } } } } }
/** * {@inheritDoc} */ public void stop() { if ((_context != null) && _context.isStarted()) { Registry registry = (Registry)_context.getServletContext().getAttribute(Registry.class.getName()); if (registry != null) { // Remove registrations for (Class<?> clazz : _classes) { LOG.debug("Stopping ... " + clazz); registry.removeRegistrations(clazz); } // Destroy the web context unless if it is default if ((registry.getSize() == 0) && (!_context.getPath().equals("/"))) { try { Container container = _context.getParent(); container.removeChild(_context); _context.stop(); _context.destroy(); LOG.info("Destroyed RESTEasy context " + _context.getPath()); } catch (Exception e) { ExtensionLogger.ROOT_LOGGER.unableToDestroyWebContext(_context.getPath(), e); } } } } } }