Search in sources :

Example 6 with SupplierDependency

use of org.wildfly.clustering.service.SupplierDependency 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);
}
Also used : SecurityConfiguration(org.infinispan.client.hotrod.configuration.SecurityConfiguration) ExecutorFactoryConfiguration(org.infinispan.client.hotrod.configuration.ExecutorFactoryConfiguration) ConnectionPoolConfiguration(org.infinispan.client.hotrod.configuration.ConnectionPoolConfiguration) Configuration(org.infinispan.client.hotrod.configuration.Configuration) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) FunctionalService(org.wildfly.clustering.service.FunctionalService) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) SupplierDependency(org.wildfly.clustering.service.SupplierDependency) ServiceSupplierDependency(org.wildfly.clustering.service.ServiceSupplierDependency) Dependency(org.wildfly.clustering.service.Dependency) SupplierDependency(org.wildfly.clustering.service.SupplierDependency) ServiceSupplierDependency(org.wildfly.clustering.service.ServiceSupplierDependency)

Aggregations

ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)6 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)6 ArrayList (java.util.ArrayList)3 Dependency (org.wildfly.clustering.service.Dependency)3 CapabilityServiceConfigurator (org.jboss.as.clustering.controller.CapabilityServiceConfigurator)2 CapabilityServiceSupport (org.jboss.as.controller.capability.CapabilityServiceSupport)2 OutboundSocketBinding (org.jboss.as.network.OutboundSocketBinding)2 ModelNode (org.jboss.dmr.ModelNode)2 Service (org.jboss.msc.Service)2 ServiceName (org.jboss.msc.service.ServiceName)2 ServiceTarget (org.jboss.msc.service.ServiceTarget)2 EnumMap (java.util.EnumMap)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 Set (java.util.Set)1 Supplier (java.util.function.Supplier)1 ClusterConfigurationBuilder (org.infinispan.client.hotrod.configuration.ClusterConfigurationBuilder)1