public class CloudHubArtifactDeployer extends Object implements ArtifactDeployer
CloudHubClient.| Constructor and Description |
|---|
CloudHubArtifactDeployer(Deployment deployment,
CloudHubClient cloudHubClient,
DeployerLog log) |
CloudHubArtifactDeployer(Deployment deployment,
DeployerLog log) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkApplicationHasStarted()
Checks if an application in CloudHub has the
STARTED_STATUS status. |
protected void |
createApplication(ApplicationMetadata applicationMetadata)
Creates the application in CloudHub.
|
void |
deployApplication()
Deploys an application to CloudHub.
|
void |
deployDomain() |
protected Application |
findApplicationFromCurrentUser(String appName)
Tries to find the application id.
|
protected String |
getApplicationName()
Retrieves the application name.
|
CloudHubClient |
getClient() |
CloudHubDeploymentVerification |
getDeploymentVerification() |
ApplicationMetadata |
getMetadata()
Retrieves an application metadata based on the deployment configuration.
|
protected void |
persistApplication()
Creates the application in CloudHub if the domain is available.
|
protected void |
startApplication()
Starts an application in CloudHub.
|
void |
undeployApplication()
Deploys an application to CloudHub, stopping it.
|
void |
undeployDomain() |
protected void |
updateApplication(ApplicationMetadata applicationMetadata)
Updates the application in CloudHub.
|
protected void |
uploadContents()
Uploads the jar contents to CloudHub.
|
public CloudHubArtifactDeployer(Deployment deployment, DeployerLog log)
public CloudHubArtifactDeployer(Deployment deployment, CloudHubClient cloudHubClient, DeployerLog log)
public void deployDomain()
throws DeploymentException
deployDomain in interface DomainDeployerDeploymentExceptionpublic void undeployDomain()
throws DeploymentException
undeployDomain in interface DomainDeployerDeploymentExceptionpublic void deployApplication()
throws DeploymentException
deployApplication in interface ApplicationDeployerDeploymentExceptionpublic void undeployApplication()
throws DeploymentException
undeployApplication in interface ApplicationDeployerDeploymentException - If the application does not exist or some internal error in CloudHub happensprotected void persistApplication()
throws DeploymentException
DeploymentException - If the application is not available and cannot be updatedprotected void uploadContents()
protected void createApplication(ApplicationMetadata applicationMetadata)
applicationMetadata - The metadata of the application to be createdprotected void updateApplication(ApplicationMetadata applicationMetadata) throws DeploymentException
applicationMetadata - The metadata of the application to be updatedDeploymentException - In case the application is not available for the current user or some other internal in CloudHub
happensprotected void startApplication()
protected void checkApplicationHasStarted()
throws DeploymentException
STARTED_STATUS status.DeploymentException - In case it timeouts while checking for the statusprotected Application findApplicationFromCurrentUser(String appName)
appName - The application name. It cannot be null nor blanknull otherwiseprotected String getApplicationName()
public CloudHubClient getClient()
public ApplicationMetadata getMetadata()
ApplicationMetadata based on the deployment configuration.public CloudHubDeploymentVerification getDeploymentVerification()
Copyright © 2018 MuleSoft Inc. All rights reserved.