Search in sources :

Example 6 with Dependency

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);
}
Also used : SingletonElectionPolicy(org.wildfly.clustering.singleton.SingletonElectionPolicy) PreferredSingletonElectionPolicy(org.wildfly.clustering.singleton.election.PreferredSingletonElectionPolicy) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) SupplierDependency(org.wildfly.clustering.service.SupplierDependency) ServiceSupplierDependency(org.wildfly.clustering.service.ServiceSupplierDependency) Dependency(org.wildfly.clustering.service.Dependency)

Example 7 with Dependency

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);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) 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) ForkChannelFactory(org.jboss.as.clustering.jgroups.ForkChannelFactory) ChannelFactory(org.wildfly.clustering.jgroups.spi.ChannelFactory)

Example 8 with Dependency

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);
}
Also used : ModClusterConfiguration(org.jboss.modcluster.config.ModClusterConfiguration) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) FunctionalService(org.wildfly.clustering.service.FunctionalService) ModClusterService(org.jboss.modcluster.ModClusterService) 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)

Aggregations

Dependency (org.wildfly.clustering.service.Dependency)8 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)8 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)8 Service (org.jboss.msc.Service)7 CompositeDependency (org.wildfly.clustering.service.CompositeDependency)5 FunctionalService (org.wildfly.clustering.service.FunctionalService)5 ChannelFactory (org.wildfly.clustering.jgroups.spi.ChannelFactory)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 Supplier (java.util.function.Supplier)1 Configuration (org.infinispan.client.hotrod.configuration.Configuration)1 ConnectionPoolConfiguration (org.infinispan.client.hotrod.configuration.ConnectionPoolConfiguration)1 ExecutorFactoryConfiguration (org.infinispan.client.hotrod.configuration.ExecutorFactoryConfiguration)1 SecurityConfiguration (org.infinispan.client.hotrod.configuration.SecurityConfiguration)1 GlobalConfiguration (org.infinispan.configuration.global.GlobalConfiguration)1 CapabilityServiceConfigurator (org.jboss.as.clustering.controller.CapabilityServiceConfigurator)1 ForkChannelFactory (org.jboss.as.clustering.jgroups.ForkChannelFactory)1 JChannelFactory (org.jboss.as.clustering.jgroups.JChannelFactory)1 CapabilityServiceSupport (org.jboss.as.controller.capability.CapabilityServiceSupport)1