use of org.jboss.msc.Service in project wildfly by wildfly.
the class ProtocolDefaultsServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(SERVICE_NAME).build(target);
Consumer<ProtocolDefaults> defaults = builder.provides(SERVICE_NAME);
Service service = new FunctionalService<>(defaults, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class RemoteSiteConfigurationServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<RemoteSiteConfiguration> configuration = new CompositeDependency(this.cluster, this.factory).register(builder).provides(this.getServiceName());
Service service = Service.newInstance(configuration, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class ThreadPoolFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<ThreadPoolFactory> factory = builder.provides(this.getServiceName());
Service service = Service.newInstance(factory, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class RemoteCacheContainerServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<RemoteCacheContainer> container = this.configuration.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(container, this, this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class XAResourceRecoveryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<XAResourceRecovery> recovery = builder.provides(this.getServiceName());
new CompositeDependency(this.cache, this.registry).register(builder);
Service service = new FunctionalService<>(recovery, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Aggregations