public class SingleNodeIntegrationTestSupport
extends java.lang.Object
SingleNodeApplication
. It exposes
components and methods used for stream creation, deployment, and destruction and provides access to the
MessageBus
. Additionally, it supports registration of modules contained in a local resource location
(default: "file:./config").Constructor and Description |
---|
SingleNodeIntegrationTestSupport(SingleNodeApplication application) |
SingleNodeIntegrationTestSupport(SingleNodeApplication application,
java.lang.String moduleResourceLocation)
Constructor useful for testing custom modules
|
Modifier and Type | Method and Description |
---|---|
void |
addPathListener(java.lang.String path,
org.apache.curator.framework.recipes.cache.PathChildrenCacheListener listener)
Add a
PathChildrenCacheListener for the given path. |
boolean |
createAndDeployStream(StreamDefinition definition) |
void |
deleteStream(java.lang.String name) |
boolean |
deployStream(StreamDefinition definition) |
boolean |
deployStream(StreamDefinition definition,
java.util.Map<java.lang.String,java.lang.String> properties) |
java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,Module>> |
getDeployedModules() |
Module |
getModule(java.lang.String streamName,
java.lang.String moduleName,
int index) |
DeploymentVerifier |
jobDeploymentVerifier() |
MessageBusSupport |
messageBus() |
void |
removePathListener(java.lang.String path,
org.apache.curator.framework.recipes.cache.PathChildrenCacheListener listener)
Remove a
PathChildrenCacheListener for the given path. |
StreamDefinitionRepository |
streamDefinitionRepository() |
StreamDeployer |
streamDeployer() |
DeploymentVerifier |
streamDeploymentVerifier() |
StreamRepository |
streamRepository() |
boolean |
undeployAndDestroyStream(StreamDefinition definition) |
boolean |
undeployStream(StreamDefinition definition) |
ZooKeeperConnection |
zooKeeperConnection() |
public SingleNodeIntegrationTestSupport(SingleNodeApplication application)
public SingleNodeIntegrationTestSupport(SingleNodeApplication application, java.lang.String moduleResourceLocation)
application
- the SingleNodeApplication
moduleResourceLocation
- an additional Spring (file: or classpath:) resource location used by the
ModuleRegistry
public final java.util.Map<java.lang.String,java.util.Map<java.lang.Integer,Module>> getDeployedModules()
public final DeploymentVerifier streamDeploymentVerifier()
public final DeploymentVerifier jobDeploymentVerifier()
public final StreamDeployer streamDeployer()
public final StreamRepository streamRepository()
public final StreamDefinitionRepository streamDefinitionRepository()
public final MessageBusSupport messageBus()
public final boolean deployStream(StreamDefinition definition)
public final boolean deployStream(StreamDefinition definition, java.util.Map<java.lang.String,java.lang.String> properties)
public final boolean createAndDeployStream(StreamDefinition definition)
public final boolean undeployStream(StreamDefinition definition)
public final boolean undeployAndDestroyStream(StreamDefinition definition)
public final void deleteStream(java.lang.String name)
public final Module getModule(java.lang.String streamName, java.lang.String moduleName, int index)
public ZooKeeperConnection zooKeeperConnection()
public void addPathListener(java.lang.String path, org.apache.curator.framework.recipes.cache.PathChildrenCacheListener listener)
PathChildrenCacheListener
for the given path.path
- the path whose children to listen tolistener
- the children listenerpublic void removePathListener(java.lang.String path, org.apache.curator.framework.recipes.cache.PathChildrenCacheListener listener)
PathChildrenCacheListener
for the given path.path
- the path whose children to listen tolistener
- the children listener