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<org.mule.runtime.container.api.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(org.mule.runtime.container.api.MuleCoreExtension coreExtension) |
void |
addDeploymentListener(org.mule.runtime.module.deployment.api.DeploymentListener listener) |
void |
addZippedServerPlugin(File plugin)
Adds a server plugin file to the Mule server.
|
void |
addZippedServerPlugin(URL resource)
Adds a server plugin to the Mule server .
|
void |
addZippedService(File service)
Adds a service implementation file to the Mule server.
|
void |
addZippedService(URL resource)
Adds a service implementation to the Mule server .
|
void |
assertDeploymentFailure(String appName) |
void |
assertDeploymentSuccess(String appName) |
void |
assertUndeploymentSuccess(org.mule.runtime.module.deployment.api.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 |
deployDomainFile(File domain)
Deploys a Domain artifact file
|
void |
deployDomainFromClasspathFolder(String domainFolder,
String domainName)
Deploys a Domain from a classpath folder
|
org.mule.runtime.deployment.model.api.application.Application |
findApplication(String appName)
Finds deployed application by name.
|
File |
getAppsDir() |
File |
getLogsDir() |
File |
getMuleHome() |
org.mule.runtime.module.repository.api.RepositoryService |
getRepositoryService() |
File |
getServerPluginsDir() |
File |
getServicesDir() |
void |
removeDeploymentListener(org.mule.runtime.module.deployment.api.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 void stop()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionpublic void start()
throws IOException,
org.mule.runtime.api.exception.MuleException
IOExceptionorg.mule.runtime.api.exception.MuleExceptionpublic void assertDeploymentSuccess(String appName)
public void assertDeploymentFailure(String appName)
public void assertUndeploymentSuccess(String appName)
public void assertUndeploymentSuccess(org.mule.runtime.module.deployment.api.DeploymentListener listener,
String appName)
public void addAppArchive(URL url) throws IOException, URISyntaxException
URISyntaxExceptionIOExceptionpublic void deploy(String resource) throws IOException, URISyntaxException
IOExceptionURISyntaxExceptionpublic void deploy(String resource, String targetAppName) throws IOException, URISyntaxException
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 accessedURISyntaxExceptionpublic void deploy(URL resource, String targetAppName) throws IOException, URISyntaxException
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 accessedURISyntaxExceptionpublic void addZippedServerPlugin(File plugin) throws IOException
plugin - plugin file to add. Non null.IOException - if the plugin file cannot be accessedpublic void addZippedServerPlugin(URL resource) throws IOException
resource - points to the plugin to add. Non null.IOException - if the plugin URL cannot be accessedpublic void addZippedService(File service) throws IOException
service - service file to add. Non null.IOException - if the servcie file cannot be accessedpublic void addZippedService(URL resource) throws IOException
resource - points to the service to add. Non null.IOException - if the service URL cannot be accessedpublic File getMuleHome()
public File getLogsDir()
public File getAppsDir()
public File getServerPluginsDir()
public File getServicesDir()
public void resetDeploymentListener()
public void addCoreExtension(org.mule.runtime.container.api.MuleCoreExtension coreExtension)
public void addDeploymentListener(org.mule.runtime.module.deployment.api.DeploymentListener listener)
public void removeDeploymentListener(org.mule.runtime.module.deployment.api.DeploymentListener listener)
public org.mule.runtime.deployment.model.api.application.Application findApplication(String appName)
public void deployDomainFromClasspathFolder(String domainFolder, String domainName) throws URISyntaxException
domainFolder - folder in which the domain is defineddomainName - name of the domain to use as domain artifact nameURISyntaxExceptionpublic void deployDomainFile(File domain) throws IOException
domain - domain file to deployIOExceptionpublic void deployAppFromClasspathFolder(String appFolder, String appName) throws URISyntaxException
appFolder - folder in which the app is definedappName - name of the domain to use as app artifact nameURISyntaxExceptionpublic org.mule.runtime.module.repository.api.RepositoryService getRepositoryService()
RepositoryServiceFactory.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.