KEYCLOAK-6541 rename AppServerContainerSPI to AppServerContainerProvider
This commit is contained in:
parent
a5c0cbc3b4
commit
7d466be94e
8 changed files with 18 additions and 18 deletions
|
@ -23,7 +23,7 @@ import org.jboss.shrinkwrap.descriptor.spi.node.Node;
|
|||
/**
|
||||
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
|
||||
*/
|
||||
public interface AppServerContainerSPI {
|
||||
public interface AppServerContainerProvider {
|
||||
|
||||
public static final String APP_SERVER = "app-server";
|
||||
|
|
@ -30,10 +30,10 @@ import org.jboss.shrinkwrap.descriptor.spi.node.Node;
|
|||
public class AppServerContainerService {
|
||||
|
||||
private static AppServerContainerService service;
|
||||
private final ServiceLoader<AppServerContainerSPI> loader;
|
||||
private final ServiceLoader<AppServerContainerProvider> loader;
|
||||
|
||||
private AppServerContainerService() {
|
||||
loader = ServiceLoader.load(AppServerContainerSPI.class);
|
||||
loader = ServiceLoader.load(AppServerContainerProvider.class);
|
||||
}
|
||||
|
||||
public static synchronized AppServerContainerService getInstance() {
|
||||
|
@ -46,13 +46,13 @@ public class AppServerContainerService {
|
|||
public List<Node> getContainers(String appServerName) {
|
||||
List<Node> containers = null;
|
||||
try {
|
||||
Iterator<AppServerContainerSPI> definitions = loader.iterator();
|
||||
Iterator<AppServerContainerProvider> definitions = loader.iterator();
|
||||
|
||||
List<AppServerContainerSPI> availableDefinitions = new ArrayList<>();
|
||||
List<AppServerContainerProvider> availableDefinitions = new ArrayList<>();
|
||||
while (definitions != null && definitions.hasNext()) {
|
||||
availableDefinitions.add(definitions.next());
|
||||
}
|
||||
for (AppServerContainerSPI def : availableDefinitions) {
|
||||
for (AppServerContainerProvider def : availableDefinitions) {
|
||||
if (def.getName().equals(appServerName)) {
|
||||
containers = def.getContainers();
|
||||
}
|
||||
|
|
|
@ -22,12 +22,12 @@ import java.util.List;
|
|||
import org.jboss.arquillian.core.spi.Validate;
|
||||
import org.jboss.as.arquillian.container.managed.ManagedDeployableContainer;
|
||||
import org.jboss.shrinkwrap.descriptor.spi.node.Node;
|
||||
import org.keycloak.testsuite.arquillian.container.AppServerContainerSPI;
|
||||
import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
|
||||
*/
|
||||
public class EAPAppServerProvider implements AppServerContainerSPI {
|
||||
public class EAPAppServerProvider implements AppServerContainerProvider {
|
||||
|
||||
private Node configuration;
|
||||
private static final String containerName = "eap";
|
||||
|
@ -77,7 +77,7 @@ public class EAPAppServerProvider implements AppServerContainerSPI {
|
|||
private Node standaloneContainer() {
|
||||
Node container = new Node("container");
|
||||
container.attribute("mode", "manual");
|
||||
container.attribute("qualifier", AppServerContainerSPI.APP_SERVER + "-" + containerName);
|
||||
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName);
|
||||
|
||||
configuration = container.createChild("configuration");
|
||||
createChild("enabled", "true");
|
||||
|
@ -117,7 +117,7 @@ public class EAPAppServerProvider implements AppServerContainerSPI {
|
|||
|
||||
Node container = group.createChild("container");
|
||||
container.attribute("mode", "manual");
|
||||
container.attribute("qualifier", AppServerContainerSPI.APP_SERVER + "-" + containerName + "-ha-node-" + number);
|
||||
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number);
|
||||
|
||||
configuration = container.createChild("configuration");
|
||||
createChild("enabled", "true");
|
||||
|
|
|
@ -22,12 +22,12 @@ import java.util.List;
|
|||
import org.jboss.arquillian.core.spi.Validate;
|
||||
import org.jboss.as.arquillian.container.managed.ManagedDeployableContainer;
|
||||
import org.jboss.shrinkwrap.descriptor.spi.node.Node;
|
||||
import org.keycloak.testsuite.arquillian.container.AppServerContainerSPI;
|
||||
import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
|
||||
*/
|
||||
public class WildflyAppServerProvider implements AppServerContainerSPI {
|
||||
public class WildflyAppServerProvider implements AppServerContainerProvider {
|
||||
|
||||
private Node configuration;
|
||||
private static final String containerName = "wildfly";
|
||||
|
@ -77,7 +77,7 @@ public class WildflyAppServerProvider implements AppServerContainerSPI {
|
|||
private Node standaloneContainer() {
|
||||
Node container = new Node("container");
|
||||
container.attribute("mode", "manual");
|
||||
container.attribute("qualifier", AppServerContainerSPI.APP_SERVER + "-" + containerName);
|
||||
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName);
|
||||
|
||||
configuration = container.createChild("configuration");
|
||||
createChild("enabled", "true");
|
||||
|
@ -117,7 +117,7 @@ public class WildflyAppServerProvider implements AppServerContainerSPI {
|
|||
|
||||
Node container = group.createChild("container");
|
||||
container.attribute("mode", "manual");
|
||||
container.attribute("qualifier", AppServerContainerSPI.APP_SERVER + "-" + containerName + "-ha-node-" + number);
|
||||
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number);
|
||||
|
||||
configuration = container.createChild("configuration");
|
||||
createChild("enabled", "true");
|
||||
|
|
|
@ -20,13 +20,13 @@ package org.keycloak.testsuite.arquillian.undertow.container;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.jboss.shrinkwrap.descriptor.spi.node.Node;
|
||||
import org.keycloak.testsuite.arquillian.container.AppServerContainerSPI;
|
||||
import org.keycloak.testsuite.arquillian.undertow.UndertowAppServer;
|
||||
import org.keycloak.testsuite.arquillian.container.AppServerContainerProvider;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:vramik@redhat.com">Vlasta Ramik</a>
|
||||
*/
|
||||
public class UndertowAppServerProvider implements AppServerContainerSPI {
|
||||
public class UndertowAppServerProvider implements AppServerContainerProvider {
|
||||
|
||||
private Node configuration;
|
||||
private static final String containerName = "undertow";
|
||||
|
@ -56,7 +56,7 @@ public class UndertowAppServerProvider implements AppServerContainerSPI {
|
|||
private Node standaloneContainer() {
|
||||
Node container = new Node("container");
|
||||
container.attribute("mode", "manual");
|
||||
container.attribute("qualifier", AppServerContainerSPI.APP_SERVER + "-" + containerName);
|
||||
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName);
|
||||
|
||||
configuration = container.createChild("configuration");
|
||||
createChild("enabled", "true");
|
||||
|
@ -70,7 +70,7 @@ public class UndertowAppServerProvider implements AppServerContainerSPI {
|
|||
private Node haNodeContainer(int number) {
|
||||
Node container = new Node("container");
|
||||
container.attribute("mode", "manual");
|
||||
container.attribute("qualifier", AppServerContainerSPI.APP_SERVER + "-" + containerName + "-ha-node-" + number);
|
||||
container.attribute("qualifier", AppServerContainerProvider.APP_SERVER + "-" + containerName + "-ha-node-" + number);
|
||||
|
||||
configuration = container.createChild("configuration");
|
||||
createChild("enabled", "true");
|
||||
|
|
Loading…
Reference in a new issue