Search in sources :

Example 1 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class ProtocolDefaultsServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(SERVICE_NAME).build(target);
    Consumer<ProtocolDefaults> defaults = builder.provides(SERVICE_NAME);
    Service service = new FunctionalService<>(defaults, Function.identity(), 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) ProtocolDefaults(org.jboss.as.clustering.jgroups.ProtocolDefaults)

Example 2 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class RemoteCacheContainerServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    Consumer<RemoteCacheContainer> container = this.configuration.register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(container, this, this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : RemoteCacheContainer(org.wildfly.clustering.infinispan.client.RemoteCacheContainer) FunctionalService(org.wildfly.clustering.service.FunctionalService) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service)

Example 3 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class XAResourceRecoveryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<XAResourceRecovery> recovery = builder.provides(this.getServiceName());
    new CompositeDependency(this.cache, this.registry).register(builder);
    Service service = new FunctionalService<>(recovery, Function.identity(), this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) InfinispanXAResourceRecovery(org.jboss.as.clustering.infinispan.InfinispanXAResourceRecovery) XAResourceRecovery(org.jboss.tm.XAResourceRecovery) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 4 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class GlobalConfigurationServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<GlobalConfiguration> global = new CompositeDependency(this.loader, this.modules, this.transport, this.server).register(builder).provides(this.getServiceName());
    for (Dependency dependency : this.pools.values()) {
        dependency.register(builder);
    }
    for (Dependency dependency : this.scheduledPools.values()) {
        dependency.register(builder);
    }
    Service service = new FunctionalService<>(global, Function.identity(), this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Also used : GlobalConfiguration(org.infinispan.configuration.global.GlobalConfiguration) 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)

Example 5 with FunctionalService

use of org.wildfly.clustering.service.FunctionalService in project wildfly by wildfly.

the class ComponentServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<C> component = this.register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(component, Function.identity(), this);
    return builder.setInstance(service).setInitialMode(this.initialMode);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service)

Aggregations

Service (org.jboss.msc.Service)46 FunctionalService (org.wildfly.clustering.service.FunctionalService)46 CompositeDependency (org.wildfly.clustering.service.CompositeDependency)20 ServiceName (org.jboss.msc.service.ServiceName)12 AsyncServiceConfigurator (org.wildfly.clustering.service.AsyncServiceConfigurator)12 Dependency (org.wildfly.clustering.service.Dependency)5 ServiceSupplierDependency (org.wildfly.clustering.service.ServiceSupplierDependency)5 SupplierDependency (org.wildfly.clustering.service.SupplierDependency)5 Group (org.wildfly.clustering.group.Group)3 RouteLocator (org.wildfly.clustering.web.routing.RouteLocator)3 ClientMapping (org.jboss.as.network.ClientMapping)2 SessionIdentifierCodec (org.jboss.as.web.session.SessionIdentifierCodec)2 ModClusterService (org.jboss.modcluster.ModClusterService)2 ServiceProviderRegistry (org.wildfly.clustering.provider.ServiceProviderRegistry)2 CommandDispatcherFactory (org.wildfly.clustering.spi.dispatcher.CommandDispatcherFactory)2 SessionManagerFactory (org.wildfly.clustering.web.session.SessionManagerFactory)2 SessionManagerFactory (io.undertow.servlet.api.SessionManagerFactory)1 ExecutorService (java.util.concurrent.ExecutorService)1 OpenAPI (org.eclipse.microprofile.openapi.models.OpenAPI)1 Cache (org.infinispan.Cache)1