use of org.wildfly.clustering.service.FunctionalService 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.wildfly.clustering.service.FunctionalService 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.wildfly.clustering.service.FunctionalService 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);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class GlobalConfigurationServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<GlobalConfiguration> global = new CompositeDependency(this.loader, this.modules, this.transport, this.server).register(builder).provides(this.getServiceName());
for (Dependency dependency : this.pools.values()) {
dependency.register(builder);
}
for (Dependency dependency : this.scheduledPools.values()) {
dependency.register(builder);
}
Service service = new FunctionalService<>(global, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.
the class ComponentServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<C> component = this.register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(component, Function.identity(), this);
return builder.setInstance(service).setInitialMode(this.initialMode);
}
Aggregations