use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class PrimaryOwnerRouteLocatorServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = new AsyncServiceConfigurator(name).build(target);
Consumer<RouteLocator> locator = new CompositeDependency(this.registry, this.cache, this.factory).register(builder).provides(name);
Service service = new FunctionalService<>(locator, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class ClientMappingsRegistryEntryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceName name = this.getServiceName();
ServiceBuilder<?> builder = target.addService(name);
Consumer<Map.Entry<String, List<ClientMapping>>> entry = new CompositeDependency(this.group, this.clientMappings).register(builder).provides(name);
Service service = new FunctionalService<>(entry, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class ChannelServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<JChannel> channel = new CompositeDependency(this.factory, this.cluster, this.server).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(channel, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class ForkChannelFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<ChannelFactory> factory = new CompositeDependency(this.parentChannel, this.parentFactory).register(builder).provides(this.getServiceName());
for (Dependency dependency : this.protocols) {
dependency.register(builder);
}
Service service = new FunctionalService<>(factory, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class CacheServiceConfigurator method build.
@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<Cache<K, V>> cache = new CompositeDependency(this.configuration, this.container, this.dependency).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(cache, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations