public <T> T getSPI(Class<T> spiType) { T t = super.getSPI(spiType); if (t != null) return t; if (spiType == ResourceLoader.class) { return spiType.cast(loader); } return null; }
public <T> T getSPI(Class<T> spiType) { if (spiType == ResourceLoader.class) { return spiType.cast(loader); } return delegate.getSPI(spiType); }
protected static ResourceInjector getResourceInjector(WSEndpoint endpoint) { ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class); if(ri==null) ri = ResourceInjector.STANDALONE; return ri; }
public @NotNull <E> Iterable<E> getIterableSPI(Class<E> spiType) { E item = getSPI(spiType); if (item != null) { Collection<E> c = Collections.singletonList(item); return c; } return Collections.emptySet(); } }
private ResourceInjector getResourceInjector(WSEndpoint endpoint) { ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class); if(ri==null) ri = ResourceInjector.STANDALONE; return ri; }
public F3SecurityServerTube(ServerTubelineAssemblyContext context, Tube nextTube) { super(context, nextTube); // override the default security environment with a Fabric3 system service secEnv = context.getEndpoint().getContainer().getSPI(SecurityEnvironment.class); }
MetroConfigLoader(Container container, MetroConfigName defaultTubesConfigNames) { this.defaultTubesConfigNames = defaultTubesConfigNames; ResourceLoader spiResourceLoader = null; if (container != null) { spiResourceLoader = container.getSPI(ResourceLoader.class); } // if spi resource can't load resource, default (MetroConfigUrlLoader) is used; // it searches the classpath, so it would be most probably used // when using jaxws- or metro-defaults from jaxws libraries init(container, spiResourceLoader, new MetroConfigUrlLoader(container)); }
MetroConfigLoader(Container container, MetroConfigName defaultTubesConfigNames) { this.defaultTubesConfigNames = defaultTubesConfigNames; ResourceLoader spiResourceLoader = null; if (container != null) { spiResourceLoader = container.getSPI(ResourceLoader.class); } // if spi resource can't load resource, default (MetroConfigUrlLoader) is used; // it searches the classpath, so it would be most probably used // when using jaxws- or metro-defaults from jaxws libraries init(container, spiResourceLoader, new MetroConfigUrlLoader(container)); }
MetroConfigLoader(Container container, MetroConfigName defaultTubesConfigNames) { this.defaultTubesConfigNames = defaultTubesConfigNames; ResourceLoader spiResourceLoader = null; if (container != null) { spiResourceLoader = container.getSPI(ResourceLoader.class); } // if spi resource can't load resource, default (MetroConfigUrlLoader) is used; // it searches the classpath, so it would be most probably used // when using jaxws- or metro-defaults from jaxws libraries init(container, spiResourceLoader, new MetroConfigUrlLoader(container)); }
/** * Gets the list of {@link BoundEndpoint} that are associated * with this endpoint. * * @return * always return the same set. */ public List<BoundEndpoint> getBoundEndpoints() { Module m = getContainer().getSPI(Module.class); return m != null ? m.getBoundEndpoints() : null; }
public @Nullable <S> S getSPI(@NotNull Class<S> spiType) { for (Component c : components) { S s = c.getSPI(spiType); if (s != null) return s; } return getContainer().getSPI(spiType); }
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); }
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); }
/** * Creates a {@link Tube} that adds container specific security */ public @NotNull Tube createSecurityTube(@NotNull Tube next) { ClientPipelineHook hook = container.getSPI(ClientPipelineHook.class); if (hook != null) { ClientPipeAssemblerContext ctxt = new ClientPipeAssemblerContext(address, wsdlModel, rootOwner, binding, container); return PipeAdapter.adapt(hook.createSecurityPipe(ctxt, PipeAdapter.adapt(next))); } return next; }
@NotNull @Override public URI getAddress() { WebModule webModule = endpoint.getContainer().getSPI(WebModule.class); if(webModule==null) { throw new WebServiceException("Container "+endpoint.getContainer()+" doesn't support "+WebModule.class); } return getAddress(webModule.getContextPath()); }
@Override public @NotNull URI getAddress() { WebModule webModule = endpoint.getContainer().getSPI(WebModule.class); if(webModule==null) // this is really a bug in the container implementation throw new WebServiceException("Container "+endpoint.getContainer()+" doesn't support "+WebModule.class); return getAddress(webModule.getContextPath()); }
@NotNull @Override public URI getAddress() { WebModule webModule = endpoint.getContainer().getSPI(WebModule.class); if(webModule==null) { throw new WebServiceException("Container "+endpoint.getContainer()+" doesn't support "+WebModule.class); } return getAddress(webModule.getContextPath()); }
/** * Creates a {@link Tube} that adds container specific security */ public @NotNull Tube createSecurityTube(@NotNull Tube next) { ServerPipelineHook hook = endpoint.getContainer().getSPI(ServerPipelineHook.class); if (hook != null) { ServerPipeAssemblerContext ctxt = new ServerPipeAssemblerContext(seiModel, wsdlModel, endpoint, terminal, isSynchronous); return PipeAdapter.adapt(hook.createSecurityPipe(ctxt, PipeAdapter.adapt(next))); } return next; }
/** * Creates a {@link Tube} that adds container specific security */ public @NotNull Tube createSecurityTube(@NotNull Tube next) { ServerPipelineHook hook = endpoint.getContainer().getSPI(ServerPipelineHook.class); if (hook != null) { ServerPipeAssemblerContext ctxt = new ServerPipeAssemblerContext(seiModel, wsdlModel, endpoint, terminal, isSynchronous); return PipeAdapter.adapt(hook.createSecurityPipe(ctxt, PipeAdapter.adapt(next))); } return next; }
/** * Creates a {@link Tube} that does the monitoring of the invocation for a * container */ public @NotNull Tube createMonitoringTube(@NotNull Tube next) { ServerPipelineHook hook = endpoint.getContainer().getSPI(ServerPipelineHook.class); if (hook != null) { ServerPipeAssemblerContext ctxt = new ServerPipeAssemblerContext(seiModel, wsdlModel, endpoint, terminal, isSynchronous); return PipeAdapter.adapt(hook.createMonitoringPipe(ctxt, PipeAdapter.adapt(next))); } return next; }