public class CloudHubDomainConnectionImpl extends CloudHubConnectionImpl implements CloudHubDomainConnectionI
CloudHubConnectionImpl.ObjectMapperaccessToken, apiToken, client, csAuthentication, DEFAULT_URL, environmentId, logger, NEW_DEFAULT_URL, password, url, username| Modifier | Constructor and Description |
|---|---|
protected |
CloudHubDomainConnectionImpl(CloudHubConnectionI con,
boolean csAuthentication,
String domain) |
protected |
CloudHubDomainConnectionImpl(CloudHubConnectionI con,
String domain) |
|
CloudHubDomainConnectionImpl(String url,
String accessToken,
boolean debug) |
|
CloudHubDomainConnectionImpl(String url,
String accessToken,
String environmentId,
boolean debug) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applicationHasNewLogging() |
com.mulesoft.ch.rest.model.Tenant |
createTenant(com.mulesoft.ch.rest.model.Tenant tenant)
Creates a tenant in the given domain based on the given object
|
void |
deleteApplication()
Deletes the application by using the connection's domain.
|
void |
deleteTenant(String tenantId)
Deletes a tenant from the given domain based on the given tenant id
|
void |
deleteTenantClientCertificates(String tenantId)
This method revokes current certificates for the given tenant from the given domain
|
void |
deleteTenants(List<String> tenantIds)
Deletes a bunch of tenant from the given domain based on the given tenant ids
|
void |
deployApplication(File file,
long maxWaitTime)
Deploys an application with the provided fileStream
|
void |
deployApplication(InputStream fileStream,
long maxWaitTime)
Deploys an application with the provided fileStream
|
File |
downloadApplicationLog_v1(Map<String,String> queryParams) |
File |
downloadApplicationLog_v2(Map<String,String> queryParams) |
File |
downloadApplicationLog(Map<String,String> queryParams)
Downloads the application's logs as a file
|
String |
getDomain()
Returns the connected domain
|
com.mulesoft.ch.rest.model.Deployment |
getLastDeployment() |
static void |
main(String[] args) |
com.mulesoft.ch.rest.model.Application |
retrieveApplication()
Retrieves the application based on the connected domain
|
com.mulesoft.ch.rest.model.LogResults |
retrieveApplicationLog_v1(Map<String,String> queryParams) |
com.mulesoft.ch.rest.model.LogResults |
retrieveApplicationLog_v2(Map<String,String> queryParams) |
com.mulesoft.ch.rest.model.LogResults |
retrieveApplicationLog(Map<String,String> queryParams)
Retrieves the application's logs
|
com.mulesoft.ch.rest.model.ApplicationStatus |
retrieveApplicationStatus()
Retrieves the application's status
|
com.mulesoft.ch.rest.model.Tenant |
retrieveTenant(String tenantId)
Retrieves an specific tenant from the given domain based on the given tenantId
|
InputStream |
retrieveTenantClientCertificates(String tenantId)
This method generates a new set of certificates used to establish a VPN connection
between the given tenant and the remote location.
|
com.mulesoft.ch.rest.model.TenantResults |
retrieveTenants(Integer limit,
Integer offset,
String query,
Boolean enabled)
Retrieves tenants from the given domain using the given parameters as filters.
|
com.mulesoft.ch.rest.model.Application |
updateApplication(com.mulesoft.ch.rest.model.ApplicationUpdateInfo newApplicationInfo)
Updates an application's information on your CloudHub account.
|
void |
updateApplicationStatus(com.mulesoft.ch.rest.model.ApplicationStatusChange applicationStatusChange,
long maxWaitTime)
Updates an application's status based on some specific commands.
|
com.mulesoft.ch.rest.model.Tenant |
updateTenant(com.mulesoft.ch.rest.model.Tenant tenant)
Updates a tenant in the given domain based on the given object
|
authorizeResource, buildException, connectWithDomain, createApplication, createApplicationBuilder, createBuilder, createConnection, createNotification, createNotificationBuilder, createResource, getAccessToken, getEnvironmentId, getPassword, getSupportedMuleVersions, getUrl, getUsername, init, isCsAuthentication, isDomainAvailable, retrieveAccount, retrieveApplications, retrieveNotification, retrieveNotifications, updateNotificationsStatus, updateNotificationStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectWithDomain, createApplication, createConnection, createNotification, getAccessToken, getEnvironmentId, getPassword, getSupportedMuleVersions, getUrl, getUsername, isCsAuthentication, isDomainAvailable, retrieveAccount, retrieveApplications, retrieveNotification, retrieveNotifications, updateNotificationsStatus, updateNotificationStatusprotected CloudHubDomainConnectionImpl(CloudHubConnectionI con, String domain)
protected CloudHubDomainConnectionImpl(CloudHubConnectionI con, boolean csAuthentication, String domain)
public CloudHubDomainConnectionImpl(String url, String accessToken, boolean debug)
public String getDomain()
CloudHubDomainConnectionIgetDomain in interface CloudHubDomainConnectionIpublic com.mulesoft.ch.rest.model.Application retrieveApplication()
throws CloudHubException
CloudHubDomainConnectionIretrieveApplication in interface CloudHubDomainConnectionIApplicationCloudHubException - if the domain does not existpublic com.mulesoft.ch.rest.model.LogResults retrieveApplicationLog(Map<String,String> queryParams) throws CloudHubException
CloudHubDomainConnectionIretrieveApplicationLog in interface CloudHubDomainConnectionILogResultsCloudHubException - if there was an error when retrieving the application logsprotected boolean applicationHasNewLogging()
throws CloudHubException
CloudHubExceptionpublic com.mulesoft.ch.rest.model.LogResults retrieveApplicationLog_v1(Map<String,String> queryParams) throws CloudHubException
CloudHubExceptionpublic com.mulesoft.ch.rest.model.LogResults retrieveApplicationLog_v2(Map<String,String> queryParams) throws CloudHubException
CloudHubExceptionpublic com.mulesoft.ch.rest.model.Deployment getLastDeployment()
throws CloudHubException
CloudHubExceptionpublic File downloadApplicationLog(Map<String,String> queryParams) throws CloudHubException
CloudHubDomainConnectionIdownloadApplicationLog in interface CloudHubDomainConnectionIFileCloudHubException - if there was an error when retrieving the application logspublic File downloadApplicationLog_v1(Map<String,String> queryParams) throws CloudHubException
CloudHubExceptionpublic File downloadApplicationLog_v2(Map<String,String> queryParams) throws CloudHubException
CloudHubExceptionpublic com.mulesoft.ch.rest.model.ApplicationStatus retrieveApplicationStatus()
throws CloudHubException
CloudHubDomainConnectionIretrieveApplicationStatus in interface CloudHubDomainConnectionIcom.mulesoft.ch.rest.model.Application.ApplicationStatusCloudHubException - if there was an error when retrieving the application statuspublic void deployApplication(InputStream fileStream, long maxWaitTime)
CloudHubDomainConnectionIdeployApplication in interface CloudHubDomainConnectionIfileStream - the stream containing the zip to be deployedmaxWaitTime - Maximum time allowed to deploy/undeploy in miliseconds.
Case 1: 0, the connector won't wait CH to finish the deploy/undeploy process and will return a response based on CH API response status.
Case 2: 1, the connector will wait until CH finish the deploy/undeploy process and will throw an exception if the deploy fails.
Case 3: anyOthervalue, the connector will wait that amount of miliseconds for CH to finish the deploy/undeploy process.
If takes longer, it will throw an exception. If takes shorter, it will follow the same process as case 2.public void deployApplication(File file, long maxWaitTime)
CloudHubDomainConnectionIdeployApplication in interface CloudHubDomainConnectionIfile - the file to be deployedmaxWaitTime - Maximum time allowed to deploy/undeploy in miliseconds.
Case 1: 0, the connector won't wait CH to finish the deploy/undeploy process and will return a response based on CH API response status.
Case 2: 1, the connector will wait until CH finish the deploy/undeploy process and will throw an exception if the deploy fails.
Case 3: anyOthervalue, the connector will wait that amount of miliseconds for CH to finish the deploy/undeploy process.
If takes longer, it will throw an exception. If takes shorter, it will follow the same process as case 2.public com.mulesoft.ch.rest.model.Application updateApplication(com.mulesoft.ch.rest.model.ApplicationUpdateInfo newApplicationInfo)
throws CloudHubException
CloudHubDomainConnectionICloudHubDomainConnectionI.deployApplication(java.io.InputStream, long) insteadupdateApplication in interface CloudHubDomainConnectionIApplication containing all the new application's information provided by CloudHubCloudHubException - if there was an error while updating the applicationpublic void updateApplicationStatus(com.mulesoft.ch.rest.model.ApplicationStatusChange applicationStatusChange,
long maxWaitTime)
throws CloudHubException
CloudHubDomainConnectionIupdateApplicationStatus in interface CloudHubDomainConnectionIapplicationStatusChange - an instance of com.mulesoft.cloudhub.client.ApplicationStatusChange with the new application statusmaxWaitTime - Maximum time allowed to deploy/undeploy in miliseconds.
Case 1: 0, the connector won't wait CH to finish the deploy/undeploy process and will return a response based on CH API response status.
Case 2: 1, the connector will wait until CH finish the deploy/undeploy process and will throw an exception if the deploy fails.
Case 3: anyOthervalue, the connector will wait that amount of miliseconds for CH to finish the deploy/undeploy process.
If takes longer, it will throw an exception. If takes shorter, it will follow the same process as case 2.CloudHubException - if there was an error while updating the application's status.public void deleteApplication()
throws CloudHubException
CloudHubDomainConnectionIdeleteApplication in interface CloudHubDomainConnectionICloudHubException - if there was an error while deleting the applicationpublic com.mulesoft.ch.rest.model.TenantResults retrieveTenants(Integer limit, Integer offset, String query, Boolean enabled) throws CloudHubException
CloudHubDomainConnectionIretrieveTenants in interface CloudHubDomainConnectionIlimit - Optional. The maximum number of tenants you want to receive in each call.offset - Optional. The off you want to start querying from.query - Optional.enabled - Optional. Flag indicating if you want to retrieve only enabled or disabledTenantResultsCloudHubException - if there was an error while retrieving the tenantspublic com.mulesoft.ch.rest.model.Tenant retrieveTenant(String tenantId) throws CloudHubException
CloudHubDomainConnectionIretrieveTenant in interface CloudHubDomainConnectionItenantId - The id the tenant you want to retrieveTenant containing all the information provided by CloudHubCloudHubException - if there was an error while retrieving the tenantpublic InputStream retrieveTenantClientCertificates(String tenantId) throws CloudHubException
CloudHubDomainConnectionIretrieveTenantClientCertificates in interface CloudHubDomainConnectionItenantId - the id of the tenant you want to generate tenant certificatesInputStream. A zip file containing new certificatesCloudHubException - if there was an error while generating new certificatespublic com.mulesoft.ch.rest.model.Tenant createTenant(com.mulesoft.ch.rest.model.Tenant tenant)
throws CloudHubException
CloudHubDomainConnectionIcreateTenant in interface CloudHubDomainConnectionItenant - an instance of Tenant with the informationTenant containing all the information provided by CloudHubCloudHubException - if there was an error while creating the tenantpublic com.mulesoft.ch.rest.model.Tenant updateTenant(com.mulesoft.ch.rest.model.Tenant tenant)
throws CloudHubException
CloudHubDomainConnectionIupdateTenant in interface CloudHubDomainConnectionItenant - an instance of Tenant with the informationTenant containing all the information provided by CloudHubCloudHubException - if there was an error while updating the tenantpublic void deleteTenant(String tenantId) throws CloudHubException
CloudHubDomainConnectionIdeleteTenant in interface CloudHubDomainConnectionItenantId - the id of the tenant you want to deleteCloudHubException - if there was an error while deleting the tenantpublic void deleteTenants(List<String> tenantIds) throws CloudHubException
CloudHubDomainConnectionIdeleteTenants in interface CloudHubDomainConnectionItenantIds - the list of tenant's ids you want to delete. IMPORTANT: If null or empty, all tenants will be deleted.CloudHubException - if there was an error while deleting the tenantspublic void deleteTenantClientCertificates(String tenantId) throws CloudHubException
CloudHubDomainConnectionIdeleteTenantClientCertificates in interface CloudHubDomainConnectionItenantId - the id of the tenant you want to generate tenant certificatesCloudHubException - if there was an error while deleting certificatespublic static void main(String[] args)
Copyright © 2012-2016. All Rights Reserved.