Search in sources :

Example 21 with CompositeDependency

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);
}
Also used : RouteLocator(org.wildfly.clustering.web.routing.RouteLocator) FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 22 with CompositeDependency

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);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceName(org.jboss.msc.service.ServiceName) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) ClientMapping(org.jboss.as.network.ClientMapping) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 23 with CompositeDependency

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);
}
Also used : JChannel(org.jgroups.JChannel) FunctionalService(org.wildfly.clustering.service.FunctionalService) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 24 with CompositeDependency

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);
}
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 25 with CompositeDependency

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);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) Cache(org.infinispan.Cache)

Aggregations

CompositeDependency (org.wildfly.clustering.service.CompositeDependency)29 Service (org.jboss.msc.Service)26 FunctionalService (org.wildfly.clustering.service.FunctionalService)20 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)10 ServiceName (org.jboss.msc.service.ServiceName)8 Dependency (org.wildfly.clustering.service.Dependency)5 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)5 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)5 ClientMapping (org.jboss.as.network.ClientMapping)2 ChannelFactory (org.wildfly.clustering.jgroups.spi.ChannelFactory)2 UndertowService (org.wildfly.extension.undertow.UndertowService)2 ExecutorService (java.util.concurrent.ExecutorService)1 OpenAPI (org.eclipse.microprofile.openapi.models.OpenAPI)1 Cache (org.infinispan.Cache)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 Configuration (org.infinispan.configuration.cache.Configuration)1 GlobalConfiguration (org.infinispan.configuration.global.GlobalConfiguration)1