use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class RegistryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<Registry<K, V>> registry = new CompositeDependency(this.factory, this.entry).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(registry, Function.identity(), this, Consumers.close());
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class SingleSignOnSessionFactoryServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<SingleSignOnSessionFactory> factory = new CompositeDependency(this.manager, this.keyStore, this.credentialSource, this.sslContext).register(builder).provides(this.getServiceName());
Service service = new FunctionalService<>(factory, Function.identity(), this);
return builder.setInstance(service);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class EJBRemotingConnectorClientMappingsEntryProviderService 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.remotingConnectorInfo).register(builder).provides(name);
Service service = new FunctionalService<>(entry, Function.identity(), this);
return builder.setInstance(service);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class CacheContainerServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
Consumer<EmbeddedCacheManager> container = new CompositeDependency(this.configuration).register(builder).provides(this.names);
Service service = new FunctionalService<>(container, this, this, this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
use of org.wildfly.clustering.service.CompositeDependency in project wildfly by wildfly.
the class RemoteCacheContainerConfigurationServiceConfigurator method build.
@Override
public ServiceBuilder<?> build(ServiceTarget target) {
ServiceBuilder<?> builder = target.addService(this.getServiceName());
Consumer<Configuration> configuration = new CompositeDependency(this.loader, this.modules, this.connectionPool, this.security, this.server).register(builder).provides(this.getServiceName());
for (Dependency dependency : this.threadPools.values()) {
dependency.register(builder);
}
for (List<SupplierDependency<OutboundSocketBinding>> dependencies : this.clusters.values()) {
for (Dependency dependency : dependencies) {
dependency.register(builder);
}
}
Service service = new FunctionalService<>(configuration, Function.identity(), this);
return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Aggregations