Search in sources :

Example 11 with CompositeDependency

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

the class RegistryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    Consumer<Registry<K, V>> registry = new CompositeDependency(this.factory, this.entry).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(registry, Function.identity(), this, Consumers.close());
    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) Registry(org.wildfly.clustering.registry.Registry) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 12 with CompositeDependency

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

the class SingleSignOnSessionFactoryServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<SingleSignOnSessionFactory> factory = new CompositeDependency(this.manager, this.keyStore, this.credentialSource, this.sslContext).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(factory, Function.identity(), this);
    return builder.setInstance(service);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) DefaultSingleSignOnSessionFactory(org.wildfly.security.http.util.sso.DefaultSingleSignOnSessionFactory) SingleSignOnSessionFactory(org.wildfly.security.http.util.sso.SingleSignOnSessionFactory) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Example 13 with CompositeDependency

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

the class EJBRemotingConnectorClientMappingsEntryProviderService 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.remotingConnectorInfo).register(builder).provides(name);
    Service service = new FunctionalService<>(entry, Function.identity(), this);
    return builder.setInstance(service);
}
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 14 with CompositeDependency

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

the class CacheContainerServiceConfigurator method build.

@Override
public ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = new AsyncServiceConfigurator(this.getServiceName()).build(target);
    Consumer<EmbeddedCacheManager> container = new CompositeDependency(this.configuration).register(builder).provides(this.names);
    Service service = new FunctionalService<>(container, this, this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.PASSIVE);
}
Also used : FunctionalService(org.wildfly.clustering.service.FunctionalService) AsyncServiceConfigurator(org.wildfly.clustering.service.AsyncServiceConfigurator) FunctionalService(org.wildfly.clustering.service.FunctionalService) ExecutorService(java.util.concurrent.ExecutorService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency) EmbeddedCacheManager(org.infinispan.manager.EmbeddedCacheManager)

Example 15 with CompositeDependency

use of org.wildfly.clustering.service.CompositeDependency 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

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