public class RestAgentToolingService extends Object implements RuntimeToolingService
| Constructor and Description |
|---|
RestAgentToolingService() |
| Modifier and Type | Method and Description |
|---|---|
List<AgentTrackingNotificationResponse> |
consumeTryItNotifications(String applicationName,
int chunkSize)
Consumes the TryIt notifications buffered by Mule Runtime for the given application.
|
String |
deployApplication(File appLocation)
Deploys an application to the Mule Runtime from the given
appLocation that points to the exploded application
content. |
String |
deployApplication(InputStream inputStream)
Deploys an application to the Mule Runtime with the content of the application zipped from the
inputStream. |
void |
disableTryIt(String applicationName)
Disables TryIt for the given application.
|
void |
disposeApplication(String applicationId)
Disposes the application for the given
applicationId. |
void |
enableTryIt(String applicationName)
Enables an application for TryIt.
|
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> |
getMetadataKeys(String applicationId,
String componentLocation)
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.descriptor.ComponentMetadataDescriptor<org.mule.runtime.api.meta.model.operation.OperationModel>> |
getOperationMetadata(String applicationId,
String componentLocation)
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)
Resolves the Metadata description for the source component of the given applicationId and componentLocation.
|
boolean |
isOperational() |
com.mulesoft.agent.domain.tooling.dataweave.model.PreviewResponse |
runDataWeave(String applicationId,
com.mulesoft.agent.domain.tooling.dataweave.model.PreviewRequest request)
Execute a dataWeave script in the context of an application.
|
void |
setToolingApiUrl(URL url,
int defaultConnectTimeout,
int defaultReadTimeout,
Optional<SSLContext> sslContext)
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.api.app.declaration.ArtifactDeclaration artifactDeclaration,
String componentId)
Does connection testing from a temporary application with the given configuration and extensions for the componentId.
|
org.mule.tooling.client.api.connectivity.ConnectionValidationResult |
testConnection(String applicationId,
String componentId)
Does connection testing over the
componentId given for the application with the applicationId identifier. |
String |
toString() |
public void setToolingApiUrl(URL url, int defaultConnectTimeout, int defaultReadTimeout, Optional<SSLContext> sslContext)
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.sslContext - Optional SSLContext 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 String deployApplication(File appLocation)
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.String application identifier for the application deployed.public String deployApplication(InputStream inputStream) 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 zip 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 void disposeApplication(String applicationId) throws org.mule.tooling.client.api.exception.ServiceUnavailableException, org.mule.tooling.client.api.exception.ToolingException
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.org.mule.tooling.client.api.exception.ToolingException - if an unexpected error happens.public org.mule.tooling.client.api.connectivity.ConnectionValidationResult testConnection(String applicationId, String componentId) 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, org.mule.tooling.client.api.exception.ToolingException
componentId given for the application with the applicationId identifier.testConnection in interface RuntimeToolingServiceapplicationId - String identifies the application to be tested.componentId - String identifies the component to be tested.ConnectionValidationResult 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.org.mule.tooling.client.api.exception.ToolingException - if an unexpected error happens.public org.mule.tooling.client.api.connectivity.ConnectionValidationResult testConnection(List<com.mulesoft.agent.domain.tooling.BundleDescriptor> dependencies, org.mule.runtime.api.app.declaration.ArtifactDeclaration artifactDeclaration, String componentId) throws org.mule.tooling.client.api.connectivity.UnsupportedConnectivityTestingObjectException, org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundException, org.mule.tooling.client.api.exception.ServiceUnavailableException, org.mule.tooling.client.api.exception.ToolingException
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.ConnectionValidationResult 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.exception.ToolingException - if an unexpected error happens.org.mule.tooling.client.api.connectivity.ConnectivityTestingObjectNotFoundExceptionpublic com.mulesoft.agent.domain.tooling.dataweave.model.PreviewResponse runDataWeave(String applicationId, com.mulesoft.agent.domain.tooling.dataweave.model.PreviewRequest request)
RuntimeToolingServicerunDataWeave in interface RuntimeToolingServiceapplicationId - application that provides contextrequest - parameters for running previewpublic org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> getMetadataKeys(String applicationId, String componentLocation) throws org.mule.tooling.client.api.exception.ServiceUnavailableException, org.mule.tooling.client.api.exception.ToolingException
MetadataResult of MetadataKey described by MetadataKeyProvider.getMetadataKeys() of the associated MetadataKeyProvider component identified by the given applicationId and componentLocation.getMetadataKeys in interface RuntimeToolingServiceapplicationId - String identifies the application.componentLocation - the location path of the MetadataKeyProvider component inside the flow.MetadataResult 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.org.mule.tooling.client.api.exception.ToolingException - if an unexpected error happens.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) throws org.mule.tooling.client.api.exception.ServiceUnavailableException, org.mule.tooling.client.api.exception.ToolingException
getOperationMetadata in interface RuntimeToolingServiceapplicationId - String identifies the application.componentLocation - the location path of the operation message processor component inside the
flow.ComponentMetadataDescriptor 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.org.mule.tooling.client.api.exception.ToolingException - if an unexpected error happens.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) throws org.mule.tooling.client.api.exception.ServiceUnavailableException, org.mule.tooling.client.api.exception.ToolingException
getSourceMetadata in interface RuntimeToolingServiceapplicationId - String identifies the application.componentLocation - the location of the component to be queried as MetadataKeyProvider component.ComponentMetadataDescriptor 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.org.mule.tooling.client.api.exception.ToolingException - if an unexpected error happens.public void enableTryIt(String applicationName) throws org.mule.tooling.client.api.exception.NoSuchApplicationException
enableTryIt 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 try it is not already deployed.public List<AgentTrackingNotificationResponse> consumeTryItNotifications(String applicationName, int chunkSize)
RuntimeToolingServiceconsumeTryItNotifications in interface RuntimeToolingServiceapplicationName - the name of the application to get its TryIt 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 disableTryIt(String applicationName)
RuntimeToolingServicedisableTryIt in interface RuntimeToolingServiceapplicationName - the name of the application to be disabled.Copyright © 2017 MuleSoft, Inc.. All rights reserved.