public class DefaultDistributedTestSupport extends java.lang.Object implements DistributedTestSupport
Constructor and Description |
---|
DefaultDistributedTestSupport() |
Modifier and Type | Method and Description |
---|---|
SpringXDTemplate |
ensureTemplate()
Return an instance of
SpringXDTemplate based on
the port configured for the admin server started by DistributedTestSupport.startup() . |
void |
shutdownAll()
Shut down all servers started, including those started via
DistributedTestSupport.startup() and all containers started via
DistributedTestSupport.startContainer(java.util.Properties) . |
void |
shutdownContainer(long pid)
Shut down the container JVM with the given process id.
|
void |
shutdownContainers()
Shut down all containers started via
DistributedTestSupport.startContainer(java.util.Properties) . |
com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> |
startContainer()
Start a container in a new JVM.
|
com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> |
startContainer(java.util.Properties properties)
Start a container in a new JVM, using the provided properties
as system properties for the container JVM process.
|
void |
startup()
Start the minimum required servers for a distributed XD system:
ZooKeeper
HSQL
Admin server (for serving REST endpoints)
|
java.util.Map<java.lang.Long,java.lang.String> |
waitForContainers()
Block the executing thread until all of the container JVMs
requested have started.
|
public void startup()
containerSystemProperties
for use in creating
new container processes via
ServerProcessUtils.startContainer(java.util.Properties)
adminUrl
for connecting to the admin serverstartup
in interface DistributedTestSupport
public SpringXDTemplate ensureTemplate()
SpringXDTemplate
based on
the port configured for the admin server started by DistributedTestSupport.startup()
.ensureTemplate
in interface DistributedTestSupport
public com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> startContainer(java.util.Properties properties)
startContainer
in interface DistributedTestSupport
properties
- properties to provide to the container processpublic com.oracle.tools.runtime.java.JavaApplication<com.oracle.tools.runtime.java.SimpleJavaApplication> startContainer()
startContainer
in interface DistributedTestSupport
public java.util.Map<java.lang.Long,java.lang.String> waitForContainers() throws java.lang.InterruptedException
waitForContainers
in interface DistributedTestSupport
java.lang.InterruptedException
ServerProcessUtils.waitForContainers(org.springframework.xd.rest.client.impl.SpringXDTemplate, java.util.Set<java.lang.Long>)
public void shutdownContainer(long pid)
shutdownContainer
in interface DistributedTestSupport
pid
- process id of container JVM to shut downpublic void shutdownContainers()
DistributedTestSupport.startContainer(java.util.Properties)
.shutdownContainers
in interface DistributedTestSupport
public void shutdownAll()
DistributedTestSupport.startup()
and all containers started via
DistributedTestSupport.startContainer(java.util.Properties)
.shutdownAll
in interface DistributedTestSupport