public void destroy() { for (String path : destinationRegistry.getDestinationsPaths()) { // clean up the destination in case the destination itself can no // longer access the registry later AbstractHTTPDestination dest = destinationRegistry.getDestinationForPath(path); synchronized (dest) { destinationRegistry.removeDestination(path); dest.releaseRegistry(); } } destinationRegistry = null; destroyBus(); }
try { String pathInfo = request.getPathInfo() == null ? "" : request.getPathInfo(); AbstractHTTPDestination d = destinationRegistry.getDestinationForPath(pathInfo, true); serviceListGenerator.service(request, res); } else { d = destinationRegistry.checkRestfulRequest(pathInfo); if (d == null || d.getMessageObserver() == null) { if (returnErrors) {
try { synchronized (registry) { AbstractHTTPDestination d = registry.getDestinationForPath(endpointInfo.getAddress()); if (d == null) { HttpDestinationFactory jettyFactory = bus.getExtension(HttpDestinationFactory.class); registry.addDestination(d); configure(bus, d); d.finalizeConfig();
final AbstractHTTPDestination dest = destRegistry.getDestinationForPath(requestURI, true); if (dest != null) { return dest; Collection<AbstractHTTPDestination> destinations = destRegistry.getDestinations(); AbstractHTTPDestination returnValue = null; for (AbstractHTTPDestination destination : destinations)
@Override public AbstractHTTPDestination getDestinationForPath(final String path, final boolean tryDecoding) { return wrap(delegate.getDestinationForPath(path, tryDecoding)); }
@Override protected void deactivate() { synchronized (this) { if (registry != null) { registry.removeDestination(path); } } }
public void setRegistry(DestinationRegistry newRegistry) { w.lock(); try { if (registry.getDestinations().isEmpty()) { this.registry = newRegistry; } else { String m = new org.apache.cxf.common.i18n.Message("CANNOT_CHANGE_REGISTRY_ALREADY_IN_USE", LOG).toString(); LOG.log(Level.SEVERE, m); throw new RuntimeException(m); } } finally { w.unlock(); } }
@Override public Set<String> getDestinationsPaths() { return delegate.getDestinationsPaths(); }
@Override protected void activate() { synchronized (this) { if (registry != null) { registry.addDestination(this); } } } @Override
@Override public AbstractHTTPDestination checkRestfulRequest(final String address) { return wrap(delegate.checkRestfulRequest(address)); }
request.removeAttribute(ServletController.AUTH_SERVICE_LIST_REALM); AbstractDestination[] destinations = destinationRegistry.getSortedDestinations(); if (request.getParameter("stylesheet") != null) { renderStyleSheet(request, response);
@Override public AbstractHTTPDestination getDestinationForPath(final String path) { return wrap(delegate.getDestinationForPath(path)); }
@Override public void shutdown() { synchronized (this) { if (registry != null) { registry.removeDestination(path); } } super.shutdown(); } }
@Override public Collection<AbstractHTTPDestination> getDestinations() { return delegate.getDestinations(); }
@Override protected void activate() { synchronized (this) { if (registry != null) { registry.addDestination(this); } } } @Override
@Override public AbstractDestination[] getSortedDestinations() { return delegate.getSortedDestinations(); }
public void destroy() { if (!globalRegistry) { for (String path : destinationRegistry.getDestinationsPaths()) { // clean up the destination in case the destination itself can // no longer access the registry later AbstractHTTPDestination dest = destinationRegistry.getDestinationForPath(path); synchronized (dest) { destinationRegistry.removeDestination(path); dest.releaseRegistry(); } } destinationRegistry = null; } destroyBus(); super.destroy(); }
public Destination getDestination(EndpointInfo endpointInfo, Bus bus) throws IOException { if (endpointInfo == null) { throw new IllegalArgumentException("EndpointInfo cannot be null"); } synchronized (registry) { AbstractHTTPDestination d = registry.getDestinationForPath(endpointInfo.getAddress()); if (d == null) { d = factory.createDestination(endpointInfo, bus, registry); registry.addDestination(d); configure(bus, d); d.finalizeConfig(); } return d; } }
public Server getServiceByRequest(HttpServletRequest request) { String pathInfo = request.getPathInfo() == null ? request.getServletPath() : request.getPathInfo(); if (pathInfo.startsWith(serviceRootUrl)) pathInfo = pathInfo.substring(serviceRootUrl.length()); for (String path : registeredServices.keySet()) { AbstractHTTPDestination d = destinationRegistry.getDestinationForPath(pathInfo, true); if (d == null) { d = destinationRegistry.checkRestfulRequest(pathInfo); } if (d!=null) { EndpointInfo ei = d.getEndpointInfo(); if (ei.getAddress().equals(registeredServices.get(path).getEndpoint().getEndpointInfo().getAddress())) { return registeredServices.get(path); } } } return null; } }
@Override protected void deactivate() { synchronized (this) { if (registry != null) { registry.removeDestination(path); } } }