public class RestAgentToolingService extends Object implements RuntimeToolingService
| Constructor and Description |
|---|
RestAgentToolingService() |
| Modifier and Type | Method and Description |
|---|---|
List<AgentTrackingNotificationResponse> |
consumeMessageHistoryNotifications(String applicationName,
int chunkSize)
Consumes the message history notifications buffered by Mule Runtime for the given application.
|
String |
deployApplication(File appLocation,
String domainName,
Map<String,String> deploymentProperties)
Deploys an application to the Mule Runtime from the given
appLocation that points to the exploded application
content. |
String |
deployApplication(InputStream inputStream,
Map<String,String> deploymentProperties)
Deploys an application to the Mule Runtime with the content of the application jar from the
inputStream. |
String |
deployApplication(InputStream inputStream,
String domainName,
Map<String,String> deploymentProperties)
Deploys an application to the Mule Runtime with the content of the application jar from the
inputStream. |
String |
deployDomain(File domainLocation,
Map<String,String> deploymentProperties)
Deploys a domain to the Mule Runtime from the given
domainLocation that points to the exploded domain
content. |
String |
deployDomain(InputStream inputStream,
Map<String,String> deploymentProperties)
Deploys a domain to the Mule Runtime with the content of the application jar from the
inputStream. |
void |
disableMessageHistory(String applicationName)
Disables message history for the given application.
|
void |
disposeApplication(String applicationId)
Disposes the application for the given
applicationId. |
void |
disposeApplicationMetadataCache(String applicationId,
String hashKey)
Disposes the metadata associated with the hashKey in the Metadata cache on Mule Runtime side.
|
void |
disposeDomain(String domainId)
Disposes the domain for the given
domainId. |
void |
disposeDomainMetadataCache(String domainId,
String hashKey)
Disposes the metadata associated with the hashKey in the Metadata cache on Mule Runtime side.
|
void |
enableMessageHistory(String applicationName)
Enables an application for message history.
|
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> |
getMetadataKeysApplication(String applicationId,
String componentLocation,
long readTimeout)
Returns a
MetadataResult of MetadataKey described by MetadataKeyProvider.getMetadataKeys() of the associated MetadataKeyProvider component identified by the given applicationId and componentLocation. |
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> |
getMetadataKeysDomain(String domainId,
String componentLocation,
long readTimeout)
Returns a
MetadataResult of MetadataKey described by MetadataKeyProvider.getMetadataKeys() of the associated MetadataKeyProvider component identified by the given domainId and componentLocation. |
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor<org.mule.runtime.api.meta.model.operation.OperationModel>> |
getOperationMetadata(String applicationId,
String componentLocation,
long readTimeout)
Resolves the Metadata description for the operation message processor component identified by the given applicationId and
componentLocaton.
|
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor<org.mule.runtime.api.meta.model.source.SourceModel>> |
getSourceMetadata(String applicationId,
String componentLocation,
long readTimeout)
Resolves the Metadata description for the source component of the given applicationId and componentLocation.
|
org.mule.runtime.api.value.ValueResult |
getValuesApplication(String applicationId,
String location,
String providerName)
Resolves the
values for a component's value provider located in the given Location. |
org.mule.runtime.api.value.ValueResult |
getValuesDomain(String domainId,
String location,
String providerName)
Resolves the
values for a component's value provider located in the given Location. |
boolean |
isOperational() |
com.mulesoft.agent.domain.tooling.dataweave.model.PreviewResponse |
runDataWeaveApplication(String applicationId,
com.mulesoft.agent.domain.tooling.dataweave.model.PreviewRequest request)
Execute a dataWeave script in the context of an application.
|
com.mulesoft.agent.domain.tooling.dataweave.model.PreviewResponse |
runDataWeaveDomain(String domainId,
com.mulesoft.agent.domain.tooling.dataweave.model.PreviewRequest request)
Execute a dataWeave script in the context of an application.
|
void |
setMuleVersion(String muleVersion) |
void |
setToolingApiUrl(URL url,
long defaultConnectTimeout,
long defaultReadTimeout,
Optional<org.mule.tooling.client.api.configuration.ssl.SslConfiguration> sslConfiguration,
Optional<org.mule.tooling.client.api.configuration.agent.proxy.ProxyConfig> proxyConfig)
Sets
URL for the Remote Mule Runtime Agent Tooling API to configure the client. |
org.mule.tooling.client.api.connectivity.ConnectionValidationResult |
testConnection(List<com.mulesoft.agent.domain.tooling.BundleDescriptor> dependencies,
org.mule.runtime.app.declaration.api.ArtifactDeclaration artifactDeclaration,
String componentId,
long readTimeout)
Does connection testing from a temporary application with the given configuration and extensions for the componentId.
|
org.mule.tooling.client.api.connectivity.ConnectionValidationResult |
testConnectionApplication(String applicationId,
String componentId,
long readTimeout)
Does connection testing over the
componentId given for the application with the applicationId identifier. |
org.mule.tooling.client.api.connectivity.ConnectionValidationResult |
testConnectionDomain(String domainId,
String componentId,
long readTimeout)
Does connection testing over the
componentId given for the domain with the domainId identifier. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdeployApplicationpublic void setToolingApiUrl(URL url, long defaultConnectTimeout, long defaultReadTimeout, Optional<org.mule.tooling.client.api.configuration.ssl.SslConfiguration> sslConfiguration, Optional<org.mule.tooling.client.api.configuration.agent.proxy.ProxyConfig> proxyConfig)
URL for the Remote Mule Runtime Agent Tooling API to configure the client.setToolingApiUrl in interface RuntimeToolingServiceurl - URL to the base URL for the Mule Runtime Agent.defaultConnectTimeout - default connection timeout for REST client.defaultReadTimeout - default read timeout for REST client.sslConfiguration - Optional SslConfiguration for the Mule Runtime Agent.proxyConfig - Optional ProxyConfig for the Mule Runtime Agent.public boolean isOperational()
isOperational in interface RuntimeToolingServicetrue if the remote tooling service is operational and ready to be used.public void setMuleVersion(String muleVersion)
setMuleVersion in interface RuntimeToolingServicemuleVersion - defines the API version to be called.public String deployApplication(File appLocation, String domainName, Map<String,String> deploymentProperties)
appLocation that points to the exploded application
content.
The application content is copied from the specified location, be aware that the original files are not modified or watched later.
deployApplication in interface RuntimeToolingServiceappLocation - File to the application exploded content.domainName - String to the domain name to be linked to when deploying this application. Can be null.String application identifier for the application deployed.public String deployDomain(File domainLocation, Map<String,String> deploymentProperties)
domainLocation that points to the exploded domain
content.
The domain content is copied from the specified location, be aware that the original files are not modified or watched later.
deployDomain in interface RuntimeToolingServicedomainLocation - File to the domain exploded content.String application identifier for the domain deployed.public String deployDomain(InputStream inputStream, Map<String,String> deploymentProperties) throws org.mule.tooling.client.api.exception.DeploymentException, org.mule.tooling.client.api.exception.ServiceUnavailableException
inputStream.deployDomain in interface RuntimeToolingServiceinputStream - InputStream with the content of the domain jar file.String application identifier for the domain deployed.org.mule.tooling.client.api.exception.DeploymentException - if there was an error while deploying the domain.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public String deployApplication(InputStream inputStream, Map<String,String> deploymentProperties) throws org.mule.tooling.client.api.exception.DeploymentException, org.mule.tooling.client.api.exception.ServiceUnavailableException
inputStream.deployApplication in interface RuntimeToolingServiceinputStream - InputStream with the content of the application jar file.String application identifier for the application deployed.org.mule.tooling.client.api.exception.DeploymentException - if there was an error while deploying the application.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public String deployApplication(InputStream inputStream, String domainName, Map<String,String> deploymentProperties) throws org.mule.tooling.client.api.exception.DeploymentException, org.mule.tooling.client.api.exception.ServiceUnavailableException
inputStream.deployApplication in interface RuntimeToolingServiceinputStream - InputStream with the content of the application jar file.domainName - String to the domain name to be linked to when deploying this application. Can be null.String application identifier for the application deployed.org.mule.tooling.client.api.exception.DeploymentException - if there was an error while deploying the application.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public void disposeApplication(String applicationId) throws org.mule.tooling.client.api.exception.ServiceUnavailableException
applicationId.disposeApplication in interface RuntimeToolingServiceapplicationId - String identifies the application to be disposed.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public void disposeDomain(String domainId) throws org.mule.tooling.client.api.exception.ServiceUnavailableException
domainId.disposeDomain in interface RuntimeToolingServicedomainId - String identifies the domain to be disposed.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public org.mule.tooling.client.api.connectivity.ConnectionValidationResult testConnectionApplication(String applicationId, String componentId, long readTimeout) throws org.mule.tooling.client.api.exception.NoSuchApplicationException, org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException, org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundException, org.mule.tooling.client.api.exception.ServiceUnavailableException
componentId given for the application with the applicationId identifier.testConnectionApplication in interface RuntimeToolingServiceapplicationId - String identifies the application to be tested.componentId - String identifies the component to be tested.readTimeout - read timeout in millisecondsConnectionValidationResult with the result of the test.org.mule.tooling.client.api.exception.NoSuchApplicationException - if the application is not deployed or it was evicted by the the service (free resources).org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException - when it's not possible to do connectivity testing over the mule
component.org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundException - when the object to use to do connectivity does not exists.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public org.mule.tooling.client.api.connectivity.ConnectionValidationResult testConnectionDomain(String domainId, String componentId, long readTimeout) throws org.mule.tooling.client.api.exception.NoSuchApplicationException, org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException, org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundException, org.mule.tooling.client.api.exception.ServiceUnavailableException
componentId given for the domain with the domainId identifier.testConnectionDomain in interface RuntimeToolingServicedomainId - String identifies the domain to be tested.componentId - String identifies the component to be tested.readTimeout - read timeout in millisecondsConnectionValidationResult with the result of the test.org.mule.tooling.client.api.exception.NoSuchApplicationException - if the domain is not deployed or it was evicted by the the service (free resources).org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException - when it's not possible to do connectivity testing over the mule
component.org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundException - when the object to use to do connectivity does not exists.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public org.mule.tooling.client.api.connectivity.ConnectionValidationResult testConnection(List<com.mulesoft.agent.domain.tooling.BundleDescriptor> dependencies, org.mule.runtime.app.declaration.api.ArtifactDeclaration artifactDeclaration, String componentId, long readTimeout) throws org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException, org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundException, org.mule.tooling.client.api.exception.ServiceUnavailableException
RuntimeToolingServicetestConnection in interface RuntimeToolingServicedependencies - BundleDescriptor's libraries to be used by the application.artifactDeclaration - ArtifactDeclaration defines the application configuration.componentId - String identifies the component to be tested.readTimeout - read timeout in millisecondsConnectionValidationResult with the result of the test.org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException - when it's not possible to do connectivity testing over the mule
component.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundExceptionpublic com.mulesoft.agent.domain.tooling.dataweave.model.PreviewResponse runDataWeaveApplication(String applicationId, com.mulesoft.agent.domain.tooling.dataweave.model.PreviewRequest request)
RuntimeToolingServicerunDataWeaveApplication in interface RuntimeToolingServiceapplicationId - application that provides contextrequest - parameters for running previewpublic com.mulesoft.agent.domain.tooling.dataweave.model.PreviewResponse runDataWeaveDomain(String domainId, com.mulesoft.agent.domain.tooling.dataweave.model.PreviewRequest request)
RuntimeToolingServicerunDataWeaveDomain in interface RuntimeToolingServicedomainId - application that provides contextrequest - parameters for running previewpublic org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> getMetadataKeysApplication(String applicationId, String componentLocation, long readTimeout) throws org.mule.tooling.client.api.exception.ServiceUnavailableException
MetadataResult of MetadataKey described by MetadataKeyProvider.getMetadataKeys() of the associated MetadataKeyProvider component identified by the given applicationId and componentLocation.getMetadataKeysApplication in interface RuntimeToolingServiceapplicationId - String identifies the application.componentLocation - the location path of the MetadataKeyProvider component inside the flow.readTimeout - read timeout in millisecondsMetadataResult if the keys are successfully resolved Failure.
MetadataResult if there is an error while resolving the keys.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> getMetadataKeysDomain(String domainId, String componentLocation, long readTimeout) throws org.mule.tooling.client.api.exception.ServiceUnavailableException
MetadataResult of MetadataKey described by MetadataKeyProvider.getMetadataKeys() of the associated MetadataKeyProvider component identified by the given domainId and componentLocation.getMetadataKeysDomain in interface RuntimeToolingServicedomainId - String identifies the domain.componentLocation - the location path of the MetadataKeyProvider component inside the flow.readTimeout - read timeout in millisecondsMetadataResult if the keys are successfully resolved Failure.
MetadataResult if there is an error while resolving the keys.org.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor<org.mule.runtime.api.meta.model.operation.OperationModel>> getOperationMetadata(String applicationId, String componentLocation, long readTimeout) throws org.mule.tooling.client.api.exception.ServiceUnavailableException
getOperationMetadata in interface RuntimeToolingServiceapplicationId - String identifies the application.componentLocation - the location path of the operation message processor component inside the
flow.readTimeout - read timeout in millisecondsComponentMetadataDescriptor with the Metadata representation of the Component. Successful
MetadataResult if the Metadata is successfully retrieved. Failure MetadataResult when the Metadata
retrieval of any element fails for any reasonorg.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.ComponentMetadataDescriptor<org.mule.runtime.api.meta.model.source.SourceModel>> getSourceMetadata(String applicationId, String componentLocation, long readTimeout) throws org.mule.tooling.client.api.exception.ServiceUnavailableException
getSourceMetadata in interface RuntimeToolingServiceapplicationId - String identifies the application.componentLocation - the location of the component to be queried as MetadataKeyProvider component.readTimeout - read timeout in millisecondsComponentMetadataDescriptor with the Metadata representation of the Component. Successful
MetadataResult if the Metadata is successfully retrieved. Failure MetadataResult when the Metadata
retrieval of any element fails for any reasonorg.mule.tooling.client.api.exception.ServiceUnavailableException - if a connection exception happens when trying to connect to Mule Agent REST API.public void disposeApplicationMetadataCache(String applicationId, String hashKey)
RuntimeToolingServicedisposeApplicationMetadataCache in interface RuntimeToolingServiceapplicationId - String identifies the application.hashKey - could be generated for a component or just for a particular component.public void disposeDomainMetadataCache(String domainId, String hashKey)
RuntimeToolingServicedisposeDomainMetadataCache in interface RuntimeToolingServicedomainId - String identifies the domain.hashKey - could be generated for a component or just for a particular component.public void enableMessageHistory(String applicationName) throws org.mule.tooling.client.api.exception.NoSuchApplicationException
enableMessageHistory in interface RuntimeToolingServiceapplicationName - the name of the application to be used when deploying it.org.mule.tooling.client.api.exception.NoSuchApplicationException - if the application to be enable for message history is not already deployed.public List<AgentTrackingNotificationResponse> consumeMessageHistoryNotifications(String applicationName, int chunkSize)
RuntimeToolingServiceconsumeMessageHistoryNotifications in interface RuntimeToolingServiceapplicationName - the name of the application to get its message history notifications.chunkSize - the maximum number of notifications to be consumed by this request.List of AgentTrackingNotification collected by the remote service at this moment.public void disableMessageHistory(String applicationName)
RuntimeToolingServicedisableMessageHistory in interface RuntimeToolingServiceapplicationName - the name of the application to be disabled.public org.mule.runtime.api.value.ValueResult getValuesApplication(String applicationId, String location, String providerName)
RuntimeToolingServicevalues for a component's value provider located in the given Location.getValuesApplication in interface RuntimeToolingServicelocation - The Location where the configuration can be found.providerName - The name of the value provider to resolve the values.result of the resolving of the values.ValueResultpublic org.mule.runtime.api.value.ValueResult getValuesDomain(String domainId, String location, String providerName)
RuntimeToolingServicevalues for a component's value provider located in the given Location.getValuesDomain in interface RuntimeToolingServicelocation - The Location where the configuration can be found.providerName - The name of the value provider to resolve the values.result of the resolving of the values.ValueResultCopyright © 2019 MuleSoft, Inc.. All rights reserved.