org.wildfly.extension.clustering.ejb.LocalClientMappingsRegistryProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wildfly-clustering-ejb-extension Show documentation
Show all versions of wildfly-clustering-ejb-extension Show documentation
Installs an extension that provides the distributable-ejb subsystem, that defines a set of profiles for use by distributable ejb applications.
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.extension.clustering.ejb;
import java.util.List;
import org.jboss.as.clustering.controller.CapabilityServiceConfigurator;
import org.jboss.as.network.ClientMapping;
import org.wildfly.clustering.ejb.infinispan.network.ClientMappingsRegistryEntryServiceConfigurator;
import org.wildfly.clustering.ejb.remote.ClientMappingsRegistryProvider;
import org.wildfly.clustering.server.service.ProvidedCacheServiceConfigurator;
import org.wildfly.clustering.server.service.group.LocalCacheGroupServiceConfiguratorProvider;
import org.wildfly.clustering.server.service.registry.LocalRegistryServiceConfiguratorProvider;
import org.wildfly.clustering.service.SupplierDependency;
/**
* A local client mappings registry provider implementation.
*
* @author Paul Ferraro
* @author Richard Achmatowicz
*/
public class LocalClientMappingsRegistryProvider implements ClientMappingsRegistryProvider {
static final String NAME = "ejb";
@Override
public Iterable getServiceConfigurators(String connectorName, SupplierDependency> clientMappings) {
CapabilityServiceConfigurator registryEntryConfigurator = new ClientMappingsRegistryEntryServiceConfigurator(NAME, connectorName, clientMappings);
CapabilityServiceConfigurator registryConfigurator = new ProvidedCacheServiceConfigurator<>(LocalRegistryServiceConfiguratorProvider.class, NAME, connectorName);
CapabilityServiceConfigurator groupConfigurator = new ProvidedCacheServiceConfigurator<>(LocalCacheGroupServiceConfiguratorProvider.class, NAME, connectorName);
return List.of(registryEntryConfigurator, registryConfigurator, groupConfigurator);
}
}