use of org.wildfly.clustering.service.Dependency in project wildfly by wildfly.
the class ElectionPolicyServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SingletonElectionPolicy> policy = builder.provides(this.getServiceName());
for (Dependency dependency : this.dependencies) {
dependency.register(builder);
}
Service service = new FunctionalService<>(policy, this, this);
return builder.setInstance(service);
}
use of org.wildfly.clustering.service.Dependency 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.Dependency in project wildfly by wildfly.
the class ProxyConfigurationServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<ModClusterConfiguration> config = new CompositeDependency(this.advertiseSocketDependency, this.sslContextDependency).register(builder).provides(this.getServiceName());
for (Dependency dependency : this.outboundSocketBindings) {
dependency.register(builder);
}
Service service = new FunctionalService<>(config, Function.identity(), this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Aggregations