if (spiType == ServletContext.class) {
return (T)servletContext;
}
if((spiType == com.sun.xml.ws.api.server.ServerPipelineHook.class) ||
(spiType == com.sun.xml.ws.assembler.ServerPipelineHook.class)){
return((T)new ServerPipeCreator(endpoint));
}
if(spiType == ResourceInjector.class) {
// Give control of injection time only for servlet endpoints
if(endpoint.implementedByWebComponent()) {
return ((T)new ResourceInjectorImpl(endpoint));
}
}
if (spiType.isAssignableFrom(ServletModule.class)) {
if (module != null) {
return ((T)spiType.cast(module));
}
}
return null;