Search in sources :

Example 1 with IdentityCapabilityServiceConfigurator

use of org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator in project wildfly by wildfly.

the class IdentityCacheRequirementServiceConfiguratorProvider method getServiceConfigurators.

@Override
public Iterable<CapabilityServiceConfigurator> getServiceConfigurators(ServiceNameRegistry<ClusteringCacheRequirement> registry, String containerName, String cacheName, String targetCacheName) {
    ServiceName name = registry.getServiceName(this.requirement);
    if (name == null)
        return Collections.emptySet();
    CapabilityServiceConfigurator configurator = new IdentityCapabilityServiceConfigurator<>(name, this.requirement, containerName, targetCacheName);
    if ((this.jndiNameFactory == null) || JndiNameFactory.DEFAULT_LOCAL_NAME.equals(targetCacheName)) {
        return Collections.singleton(configurator);
    }
    ContextNames.BindInfo binding = ContextNames.bindInfoFor(this.jndiNameFactory.apply(containerName, cacheName).getAbsoluteName());
    CapabilityServiceConfigurator binderConfigurator = new BinderServiceConfigurator(binding, configurator.getServiceName());
    return Arrays.asList(configurator, binderConfigurator);
}
Also used : BinderServiceConfigurator(org.jboss.as.clustering.naming.BinderServiceConfigurator) IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) CapabilityServiceConfigurator(org.jboss.as.clustering.controller.CapabilityServiceConfigurator) ServiceName(org.jboss.msc.service.ServiceName) IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) ContextNames(org.jboss.as.naming.deployment.ContextNames)

Example 2 with IdentityCapabilityServiceConfigurator

use of org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator in project wildfly by wildfly.

the class SingletonServiceConfiguratorFactoryServiceConfiguratorProvider method getServiceConfigurators.

@Override
public Iterable<CapabilityServiceConfigurator> getServiceConfigurators(ServiceNameRegistry<ClusteringCacheRequirement> registry, String containerName, String cacheName) {
    Iterable<CapabilityServiceConfigurator> configurators = super.getServiceConfigurators(registry, containerName, cacheName);
    @SuppressWarnings("deprecation") ServiceName name = registry.getServiceName(ClusteringCacheRequirement.SINGLETON_SERVICE_BUILDER_FACTORY);
    if (name == null)
        return configurators;
    // Add configurator for deprecated capability
    CapabilityServiceConfigurator deprecatedConfigurator = new IdentityCapabilityServiceConfigurator<>(name, ClusteringCacheRequirement.SINGLETON_SERVICE_CONFIGURATOR_FACTORY, containerName, cacheName);
    return new CompositeIterable<>(configurators, Collections.singleton(deprecatedConfigurator));
}
Also used : IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) CapabilityServiceConfigurator(org.jboss.as.clustering.controller.CapabilityServiceConfigurator) ServiceName(org.jboss.msc.service.ServiceName) IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) CompositeIterable(org.wildfly.clustering.ee.CompositeIterable)

Example 3 with IdentityCapabilityServiceConfigurator

use of org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator in project wildfly by wildfly.

the class IdentityRegistryFactoryServiceConfiguratorProvider method getServiceConfigurators.

@Override
public Iterable<CapabilityServiceConfigurator> getServiceConfigurators(ServiceNameRegistry<ClusteringCacheRequirement> registry, String containerName, String aliasCacheName, String targetCacheName) {
    Iterable<CapabilityServiceConfigurator> configurators = super.getServiceConfigurators(registry, containerName, aliasCacheName, targetCacheName);
    ServiceName registryServiceName = registry.getServiceName(ClusteringCacheRequirement.REGISTRY);
    ServiceName registryEntryServiceName = registry.getServiceName(ClusteringCacheRequirement.REGISTRY_ENTRY);
    if ((registryServiceName == null) && (registryEntryServiceName == null))
        return configurators;
    List<CapabilityServiceConfigurator> registryConfigurators = new ArrayList<>(2);
    if (registryServiceName != null) {
        registryConfigurators.add(new IdentityCapabilityServiceConfigurator<>(registryServiceName, ClusteringCacheRequirement.REGISTRY, containerName, targetCacheName));
    }
    if (registryEntryServiceName != null) {
        registryConfigurators.add(new IdentityCapabilityServiceConfigurator<>(registryEntryServiceName, ClusteringCacheRequirement.REGISTRY_ENTRY, containerName, targetCacheName));
    }
    return new CompositeIterable<>(configurators, registryConfigurators);
}
Also used : IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) CapabilityServiceConfigurator(org.jboss.as.clustering.controller.CapabilityServiceConfigurator) ServiceName(org.jboss.msc.service.ServiceName) ArrayList(java.util.ArrayList) CompositeIterable(org.wildfly.clustering.ee.CompositeIterable)

Example 4 with IdentityCapabilityServiceConfigurator

use of org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator in project wildfly by wildfly.

the class IdentityGroupRequirementServiceConfiguratorProvider method getServiceConfigurators.

@Override
public Iterable<CapabilityServiceConfigurator> getServiceConfigurators(ServiceNameRegistry<ClusteringRequirement> registry, String group, String targetGroup) {
    ServiceName name = registry.getServiceName(this.requirement);
    if (name == null)
        return Collections.emptySet();
    CapabilityServiceConfigurator configurator = new IdentityCapabilityServiceConfigurator<>(name, this.requirement, targetGroup);
    if ((this.jndiNameFactory == null) || JndiNameFactory.DEFAULT_LOCAL_NAME.equals(targetGroup)) {
        return Collections.singleton(configurator);
    }
    ContextNames.BindInfo binding = ContextNames.bindInfoFor(this.jndiNameFactory.apply(group).getAbsoluteName());
    CapabilityServiceConfigurator binderConfigurator = new BinderServiceConfigurator(binding, configurator.getServiceName());
    return Arrays.asList(configurator, binderConfigurator);
}
Also used : BinderServiceConfigurator(org.jboss.as.clustering.naming.BinderServiceConfigurator) IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) CapabilityServiceConfigurator(org.jboss.as.clustering.controller.CapabilityServiceConfigurator) ServiceName(org.jboss.msc.service.ServiceName) IdentityCapabilityServiceConfigurator(org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator) ContextNames(org.jboss.as.naming.deployment.ContextNames)

Aggregations

CapabilityServiceConfigurator (org.jboss.as.clustering.controller.CapabilityServiceConfigurator)4 IdentityCapabilityServiceConfigurator (org.jboss.as.clustering.controller.IdentityCapabilityServiceConfigurator)4 ServiceName (org.jboss.msc.service.ServiceName)4 BinderServiceConfigurator (org.jboss.as.clustering.naming.BinderServiceConfigurator)2 ContextNames (org.jboss.as.naming.deployment.ContextNames)2 CompositeIterable (org.wildfly.clustering.ee.CompositeIterable)2 ArrayList (java.util.ArrayList)1