use of org.jboss.msc.Service in project wildfly by wildfly.
the class AbstractProtocolConfigurationServiceConfigurator method build.
@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<C> configuration = this.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(configuration, 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 ChannelClusterServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<String> cluster = builder.provides(this.getServiceName());
Service service = Service.newInstance(cluster, this.cluster);
return builder.setInstance(service);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class ConfigurationServiceConfigurator method build.
@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<Configuration> configuration = new CompositeDependency(this.container, this.dependency).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(configuration, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class CacheSingletonServiceConfiguratorFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SingletonServiceConfiguratorFactory> factory = builder.provides(this.getServiceName());
@SuppressWarnings("deprecation") Service service = Service.newInstance(factory, new DistributedSingletonServiceBuilderFactory(this));
return builder.setInstance(service);
}
use of org.jboss.msc.Service in project wildfly by wildfly.
the class AbstractLocalGroupServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
this.environment = builder.requires(ServerEnvironmentService.SERVICE_NAME);
Consumer<Group> group = builder.provides(this.getServiceName());
Service service = new FunctionalService<>(group, this, this.environment);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations