use of org.jboss.ws.api.monitoring.RecordProcessor in project wildfly by wildfly.
the class EndpointService method start.
@Override
public void start(final StartContext context) {
WSLogger.ROOT_LOGGER.starting(name);
if (endpoint.getProperty(ELYTRON_SECURITY_DOMAIN) != null && Boolean.parseBoolean(endpoint.getProperty(ELYTRON_SECURITY_DOMAIN).toString())) {
if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomain.get().getSecurityDomain()));
} else {
endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.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);
}
use of org.jboss.ws.api.monitoring.RecordProcessor in project wildfly by wildfly.
the class EndpointService method stop.
@Override
public void stop(final StopContext context) {
WSLogger.ROOT_LOGGER.stopping(name);
ServiceContainerEndpointRegistry.unregister(aliasName, endpoint);
endpoint.getLifecycleHandler().stop(endpoint);
endpoint.setSecurityDomainContext(null);
unregisterEndpoint(endpoint);
final List<RecordProcessor> processors = endpoint.getRecordProcessors();
for (final RecordProcessor processor : processors) {
unregisterRecordProcessor(processor, endpoint);
}
}
use of org.jboss.ws.api.monitoring.RecordProcessor in project wildfly by wildfly.
the class EndpointRecordProcessorDeploymentAspect method start.
@Override
public void start(final Deployment dep) {
final int size = processors.size();
for (final Endpoint ep : dep.getService().getEndpoints()) {
List<RecordProcessor> processorList = new Vector<RecordProcessor>(size);
for (RecordProcessor pr : processors) {
try {
RecordProcessor clone = (RecordProcessor) pr.clone();
processorList.add(clone);
} catch (final CloneNotSupportedException ex) {
throw new RuntimeException(ex);
}
}
ep.setRecordProcessors(processorList);
}
}
Aggregations