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);
}
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));
}
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);
}
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);
}
Aggregations