Search in sources :

Example 1 with ElytronSecurityDomainContextImpl

use of org.jboss.as.webservices.security.ElytronSecurityDomainContextImpl in project wildfly by wildfly.

the class EndpointService method start.

@Override
public void start(final StartContext context) throws StartException {
    WSLogger.ROOT_LOGGER.starting(name);
    final String domainName = getDeploymentSecurityDomainName(endpoint);
    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);
}
Also used : EndpointMetricsFactory(org.jboss.wsf.spi.management.EndpointMetricsFactory) EJBMethodSecurityAttributesAdaptor(org.jboss.as.webservices.security.EJBMethodSecurityAttributesAdaptor) RecordProcessor(org.jboss.ws.api.monitoring.RecordProcessor) ManagedRecordProcessor(org.jboss.ws.common.monitoring.ManagedRecordProcessor) SecurityDomainContextImpl(org.jboss.as.webservices.security.SecurityDomainContextImpl) ElytronSecurityDomainContextImpl(org.jboss.as.webservices.security.ElytronSecurityDomainContextImpl) ElytronSecurityDomainContextImpl(org.jboss.as.webservices.security.ElytronSecurityDomainContextImpl) EJBViewMethodSecurityAttributesService(org.jboss.as.ejb3.security.service.EJBViewMethodSecurityAttributesService)

Aggregations

EJBViewMethodSecurityAttributesService (org.jboss.as.ejb3.security.service.EJBViewMethodSecurityAttributesService)1 EJBMethodSecurityAttributesAdaptor (org.jboss.as.webservices.security.EJBMethodSecurityAttributesAdaptor)1 ElytronSecurityDomainContextImpl (org.jboss.as.webservices.security.ElytronSecurityDomainContextImpl)1 SecurityDomainContextImpl (org.jboss.as.webservices.security.SecurityDomainContextImpl)1 RecordProcessor (org.jboss.ws.api.monitoring.RecordProcessor)1 ManagedRecordProcessor (org.jboss.ws.common.monitoring.ManagedRecordProcessor)1 EndpointMetricsFactory (org.jboss.wsf.spi.management.EndpointMetricsFactory)1