Search in sources :

Example 6 with CompositeDependency

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

the class ChannelCommandDispatcherFactoryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    this.loader = builder.requires(Services.JBOSS_SERVICE_MODULE_LOADER);
    Consumer<CommandDispatcherFactory> factory = new CompositeDependency(this.channel, this.channelFactory, this.module).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(factory, Functions.identity(), this, Consumers.close());
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) CommandDispatcherFactory(org.wildfly.clustering.dispatcher.CommandDispatcherFactory) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 7 with CompositeDependency

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

the class UndertowEventHandlerAdapterServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    new CompositeDependency(this.service, this.listener, this.suspendController).register(builder);
    this.eventHandler = builder.requires(ProxyConfigurationResourceDefinition.Capability.SERVICE.getDefinition().getCapabilityServiceName(proxyName));
    Service service = new UndertowEventHandlerAdapterService(this);
    return builder.setInstance(service);
}
Also used : AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) Service(org.jboss.msc.Service) UndertowService(org.wildfly.extension.undertow.UndertowService) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 8 with CompositeDependency

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

the class DistributableCacheFactoryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    this.configurator.build(target).install();
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    Consumer<CacheFactory<K, V>> factory = new CompositeDependency(this.factory, this.tsr).register(builder).provides(name);
    Service service = Service.newInstance(factory, this);
    return builder.setInstance(service);
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) CacheFactory(org.jboss.as.ejb3.cache.CacheFactory)

Example 9 with CompositeDependency

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

the class CacheServiceProviderRegistryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    Consumer<ServiceProviderRegistry<T>> registry = new CompositeDependency(this.cache, this.dispatcherFactory, this.group).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(registry, Functions.identity(), this, Consumers.close());
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) ServiceProviderRegistry(org.wildfly.clustering.provider.ServiceProviderRegistry) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 10 with CompositeDependency

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

the class OpenAPIHttpHandlerServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceName name = this.getServiceName();
    ServiceBuilder<?> builder = target.addService(name);
    new CompositeDependency(this.model, this.host).register(builder);
    return builder.setInstance(this);
}
Also used : ServiceName(org.jboss.msc.service.ServiceName) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

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