public EndpointHandlerDeploymentAspect() { spiProvider = SPIProvider.getInstance(); }
public static Endpoint initEndpoint(ServletConfig servletConfig, String servletName) { final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader(); final EndpointRegistry epRegistry = SPIProvider.getInstance().getSPI(EndpointRegistryFactory.class, cl).getEndpointRegistry(); ServletContext context = servletConfig.getServletContext(); String contextPath = context.getContextPath(); context.setAttribute(ServletConfig.class.getName(), servletConfig); return initServiceEndpoint(epRegistry, contextPath, servletName); }
public static File createTempDirectory() throws IOException { File tmpdir = null; try { // TODO: recursive dependency, ohoh ServerConfig config = SPIProvider.getInstance().getSPI(ServerConfigFactory.class).getServerConfig(); tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/jbossws"); if (!tmpdir.mkdirs()) { tmpdir = null; } } catch (Throwable t) { // Use the Java temp directory if there is no server config (the client) tmpdir = null; } return tmpdir; } }
private static ServerConfig getServerConfig() { final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader(); final ServerConfigFactory scf = SPIProvider.getInstance().getSPI(ServerConfigFactory.class, cl); return scf != null ? scf.getServerConfig() : null; } }
private void setStackConfig() { if (stackConfig == null) { synchronized (this) { if (stackConfig == null) { //Retrieve the stackConfig using SPIProvider final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader(); this.stackConfig = SPIProvider.getInstance().getSPI(StackConfigFactory.class, cl).getStackConfig(); } } } }
private int getConnectorPort(boolean secure) { final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader(); int port = 0; try { WebServerInfo webServerInfo = SPIProvider.getInstance().getSPI(WebServerInfoFactory.class, cl).newWebServerInfo(); port = webServerInfo.getPort("HTTP/1.1", secure); } catch (WSFException e) { MANAGEMENT_LOGGER.couldNotGetPortFromConfiguredHTTPConnector(); } return port; }
@Override public void start(final StartContext context) { WSLogger.ROOT_LOGGER.starting(name); final String domainName = (String)endpoint.getProperty(SECURITY_DOMAIN_NAME); if (isElytronSecurityDomain(endpoint, domainName)) { if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomain.get().getSecurityDomain())); } else { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.get())); } } else { endpoint.setSecurityDomainContext(new SecurityDomainContextImpl(securityDomainContext.get())); } if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { final EJBViewMethodSecurityAttributesService ejbMethodSecurityAttributeService = this.ejbMethodSecurityAttributeService.get(); endpoint.addAttachment(EJBMethodSecurityAttributeProvider.class, new EJBMethodSecurityAttributesAdaptor(ejbMethodSecurityAttributeService)); } final List<RecordProcessor> processors = endpoint.getRecordProcessors(); for (final RecordProcessor processor : processors) { registerRecordProcessor(processor, endpoint); } final EndpointMetricsFactory endpointMetricsFactory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class); endpoint.setEndpointMetrics(endpointMetricsFactory.newEndpointMetrics()); registerEndpoint(endpoint); endpoint.getLifecycleHandler().start(endpoint); ServiceContainerEndpointRegistry.register(aliasName, endpoint); endpointConsumer.accept(endpoint); }
final JASPIAuthenticationProvider jaspiProvider = SPIProvider.getInstance().getSPI( JASPIAuthenticationProvider.class, ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
@Override public void start(final StartContext context) throws StartException { WSLogger.ROOT_LOGGER.starting(name); final String domainName = (String)endpoint.getProperty(SECURITY_DOMAIN_NAME); if (isElytronSecurityDomain(endpoint, domainName)) { if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomainValue.getValue().getSecurityDomain())); } else { endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.getValue())); } } else { endpoint.setSecurityDomainContext(new SecurityDomainContextImpl(securityDomainContextValue.getValue())); } if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) { final EJBViewMethodSecurityAttributesService ejbMethodSecurityAttributeService = ejbMethodSecurityAttributeServiceValue.getValue(); endpoint.addAttachment(EJBMethodSecurityAttributeProvider.class, new EJBMethodSecurityAttributesAdaptor(ejbMethodSecurityAttributeService)); } final List<RecordProcessor> processors = endpoint.getRecordProcessors(); for (final RecordProcessor processor : processors) { registerRecordProcessor(processor, endpoint); } final EndpointMetricsFactory factory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class); endpoint.setEndpointMetrics(factory.newEndpointMetrics()); registerEndpoint(endpoint); endpoint.getLifecycleHandler().start(endpoint); }