/** * Represents a resource local to a thread. * * See {@link WSEndpoint} class javadoc for more discussion about * this. */ public interface PipeHead { /** * Processes a request and produces a reply. * * <p> * This method takes a {@link Packet} that represents * a request, run it through a {@link Tube}line, eventually * pass it to the user implementation code, which produces * a reply, then run that through the pipeline again, * and eventually return it as a return value. * * @param request * Unconsumed {@link Packet} that represents * a request. * @param wscd * {@link WebServiceContextDelegate} to be set to {@link Packet}. * (we didn't have to take this and instead just ask the caller to * set to {@link Packet#webServiceContextDelegate}, but that felt * too error prone.) * @param tbc * {@link TransportBackChannel} to be set to {@link Packet}. * See the {@code wscd} parameter javadoc for why this is a parameter. * Can be null. * @return
public void dispose() { endpoint.dispose(); }
public DeployedEndpointData(String path, ServletAdapter adapter) { super(path, "", ""); WSEndpoint endpoint = adapter.getEndpoint(); this.appName = ""; this.endpointName = adapter.getName(); this.namespace = endpoint.getServiceName().getNamespaceURI(); this.serviceName = endpoint.getServiceName().getLocalPart(); this.portName = endpoint.getPortName().getLocalPart(); this.implClass = endpoint.getImplementationClass().getName(); this.address = path; this.wsdl = address+"?wsdl"; this.tester = ""; this.implType = "SERVLET"; this.deploymentType = "RI"; fillStatMap(); }
public DocumentAddressResolver getDocumentAddressResolver( PortAddressResolver portAddressResolver) { final String address = portAddressResolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart()); assert address != null; return new DocumentAddressResolver() { @Override public String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced) { // the map on endpoint should account for all SDDocument assert revWsdls.containsKey(referenced); return address+'?'+ revWsdls.get(referenced); } }; }
public @Nullable <S> S getSPI(@NotNull Class<S> spiType) { Set<Component> componentRegistry = getComponents(); if (componentRegistry != null) { for (Component c : componentRegistry) { S s = c.getSPI(spiType); if (s != null) return s; } } return getContainer().getSPI(spiType); }
protected static ResourceInjector getResourceInjector(WSEndpoint endpoint) { ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class); if(ri==null) ri = ResourceInjector.STANDALONE; return ri; }
public WSBinding getBinding() { if (endpoint != null) { return endpoint.getBinding(); } if (proxy != null) { return (WSBinding) proxy.getBinding(); } return null; } /**
wsEndpoint = WSEndpoint.create(seiClass, false, invoker, serviceName, portName, endpointContainer, binding, primaryWsdl, metadata, null, true); } catch (WebServiceException e) { if (e.getMessage().contains("Not a primary WSDL")) { wsEndpoint = WSEndpoint.create(seiClass, false, invoker, serviceName, portName, endpointContainer, binding, null, metadata, null, true); } else { throw e; wsEndpoint.setExecutor(executorService);
@Override public T createAdapter(String name, String urlPattern, WSEndpoint<?> endpoint) { T t = createHttpAdapter(name, urlPattern, endpoint); adapters.add(t); WSDLPort port = endpoint.getPort(); if (port != null) { PortInfo portInfo = new PortInfo(port.getOwner().getName(),port.getName().getLocalPart(), endpoint.getImplementationClass()); addressMap.put(portInfo, getValidPath(urlPattern)); } return t; }
@ManagedAttribute @Description("Service name") public @NotNull QName serviceName() { return endpoint.getServiceName(); }
@ManagedAttribute @Description("Port name") public @NotNull QName portName() { return endpoint.getPortName(); }
public PortAddressResolver getPortAddressResolver(String baseAddress) { return owner.createPortAddressResolver(baseAddress, endpoint.getImplementationClass()); }
public DocumentAddressResolver getDocumentAddressResolver( PortAddressResolver portAddressResolver) { final String address = portAddressResolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart()); assert address != null; return new DocumentAddressResolver() { @Override public String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced) { // the map on endpoint should account for all SDDocument assert revWsdls.containsKey(referenced); return address+'?'+ revWsdls.get(referenced); } }; }
protected ServerAdapter(String name, String urlPattern, WSEndpoint endpoint, ServerAdapterList owner) { super(endpoint, owner, urlPattern); this.name = name; // registers itself with the container Module module = endpoint.getContainer().getSPI(Module.class); if(module==null) LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}", new Object[]{endpoint.getContainer(), Module.class}); else { module.getBoundEndpoints().add(this); } }
public WSBinding getBinding() { if (endpoint != null) { return endpoint.getBinding(); } if (proxy != null) { return (WSBinding) proxy.getBinding(); } return null; } /**
wsEndpoint = WSEndpoint.create(seiClass, false, invoker, serviceName, portName, endpointContainer, binding, primaryWsdl, metadata, null, true); } catch (WebServiceException e) { if (e.getMessage().contains("Not a primary WSDL")) { wsEndpoint = WSEndpoint.create(seiClass, false, invoker, serviceName, portName, endpointContainer, binding, null, metadata, null, true); } else { throw e; wsEndpoint.setExecutor(executorService);
@Override public T createAdapter(String name, String urlPattern, WSEndpoint<?> endpoint) { T t = createHttpAdapter(name, urlPattern, endpoint); adapters.add(t); WSDLPort port = endpoint.getPort(); if (port != null) { PortInfo portInfo = new PortInfo(port.getOwner().getName(),port.getName().getLocalPart(), endpoint.getImplementationClass()); addressMap.put(portInfo, getValidPath(urlPattern)); } return t; }
@ManagedAttribute @Description("Service name") public @NotNull QName serviceName() { return endpoint.getServiceName(); }