private void removeApplication(ServiceReference reference) { PaxWicketApplicationFactory factory; synchronized (factories) { if (!factories.containsKey(reference)) { LOGGER.warn( "Trying to unregister ApplicationFactory without application name or mount point is not possible"); return; } factory = factories.remove(reference); } LOGGER.debug("Service Removed [{}], Factory hash [{}]", reference, identityHashCode(factory)); httpTracker.removeServlet(factory.getMountPoint()); }
private void addApplication( ServiceReference reference, PaxWicketApplicationFactory internalFactory) { if (!internalFactory.isValidFactory()) { LOGGER.warn( "Trying to register ApplicationFactory without application name or mount point is not possible"); return; } LOGGER.debug( "Service Added [{}], Factory hash [{}]", reference, identityHashCode(internalFactory)); Servlet servlet = ServletProxy.newServletProxy(internalFactory); addServlet( internalFactory.getMountPoint(), servlet, internalFactory.getContextParams(), reference); synchronized (factories) { factories.put(reference, internalFactory); } }