public class FakeMuleServer extends Object
Modifier and Type | Field and Description |
---|---|
protected static int |
DEPLOYMENT_TIMEOUT |
static String |
FAKE_SERVER_DISABLE_LOG_REPOSITORY_SELECTOR |
Constructor and Description |
---|
FakeMuleServer(String muleHomePath) |
FakeMuleServer(String muleHomePath,
List<MuleCoreExtension> intialCoreExtensions) |
Modifier and Type | Method and Description |
---|---|
void |
addAppArchive(URL url)
Copies a given app archive to the apps folder for deployment.
|
void |
addCoreExtension(MuleCoreExtension coreExtension) |
void |
addDeploymentListener(DeploymentListener listener) |
void |
addZippedPlugin(File plugin)
Adds a plugin file to the Mule server.
|
void |
addZippedPlugin(URL resource)
Adds a plugin to the Mule server .
|
void |
assertDeploymentFailure(String appName) |
void |
assertDeploymentSuccess(String appName) |
void |
assertUndeploymentSuccess(DeploymentListener listener,
String appName) |
void |
assertUndeploymentSuccess(String appName) |
void |
deploy(String resource) |
void |
deploy(String resource,
String targetAppName)
Deploys an application from a classpath resource
|
void |
deploy(URL resource,
String targetAppName)
Deploys an application from an URL
|
void |
deployAppFromClasspathFolder(String appFolder,
String appName)
Deploys an Application from a classpath folder
|
void |
deployDomainFromClasspathFolder(String domainFolder,
String domainName)
Deploys a Domain from a classpath folder
|
Application |
findApplication(String appName)
Finds deployed application by name.
|
File |
getAppsDir() |
File |
getLogsDir() |
File |
getMuleHome() |
File |
getPluginsDir() |
void |
removeDeploymentListener(DeploymentListener listener) |
void |
resetDeploymentListener() |
void |
start() |
void |
stop() |
protected static final int DEPLOYMENT_TIMEOUT
public static final String FAKE_SERVER_DISABLE_LOG_REPOSITORY_SELECTOR
public FakeMuleServer(String muleHomePath)
public FakeMuleServer(String muleHomePath, List<MuleCoreExtension> intialCoreExtensions)
public void stop() throws MuleException
MuleException
public void start() throws IOException, MuleException
IOException
MuleException
public void assertDeploymentSuccess(String appName)
public void assertDeploymentFailure(String appName)
public void assertUndeploymentSuccess(String appName)
public void assertUndeploymentSuccess(DeploymentListener listener, String appName)
public void addAppArchive(URL url) throws IOException
IOException
public void deploy(String resource) throws IOException
IOException
public void deploy(String resource, String targetAppName) throws IOException
resource
- points to the resource to deploy. Non null.targetAppName
- application name used to deploy the resource. Null to
maintain the original resource nameIOException
- if the resource cannot be accessedpublic void deploy(URL resource, String targetAppName) throws IOException
resource
- points to the resource to deploy. Non null.targetAppName
- application name used to deploy the resource. Null to
maintain the original resource nameIOException
- if the URL cannot be accessedpublic void addZippedPlugin(File plugin) throws IOException
plugin
- plugin file to add. Non null.IOException
- if the plugin file cannot be accessedpublic void addZippedPlugin(URL resource) throws IOException
resource
- points to the plugin to add. Non null.IOException
- if the plugin URL cannot be accessedpublic File getMuleHome()
public File getLogsDir()
public File getAppsDir()
public File getPluginsDir()
public void resetDeploymentListener()
public void addCoreExtension(MuleCoreExtension coreExtension)
public void addDeploymentListener(DeploymentListener listener)
public void removeDeploymentListener(DeploymentListener listener)
public Application findApplication(String appName)
public void deployDomainFromClasspathFolder(String domainFolder, String domainName)
domainFolder
- folder in which the domain is defineddomainName
- name of the domain to use as domain artifact nameCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.