Class RuntimeTemplate

java.lang.Object
org.springframework.cloud.dataflow.rest.client.RuntimeTemplate
All Implemented Interfaces:
RuntimeOperations

public class RuntimeTemplate extends Object implements RuntimeOperations
Implementation for RuntimeOperations.
Author:
Eric Bottard, Mark Fisher, Christian Tzolov, Chris Bono, Corneil du Plessis
  • Method Details

    • status

      public org.springframework.hateoas.PagedModel<AppStatusResource> status()
      Specified by:
      status in interface RuntimeOperations
      Returns:
      the runtime information about all deployed apps.
    • status

      public AppStatusResource status(String deploymentId)
      Specified by:
      status in interface RuntimeOperations
      Parameters:
      deploymentId - the deployment id
      Returns:
      the runtime information about a single app deployment.
    • streamStatus

      public org.springframework.hateoas.PagedModel<StreamStatusResource> streamStatus(String... streamNames)
      Specified by:
      streamStatus in interface RuntimeOperations
      Parameters:
      streamNames - deployed stream names
      Returns:
      the runtime information about the deployed streams their apps and instances.
    • getFromActuator

      public String getFromActuator(String appId, String instanceId, String endpoint)
      Description copied from interface: RuntimeOperations
      Access an HTTP GET exposed actuator resource for a deployed app instance.
      Specified by:
      getFromActuator in interface RuntimeOperations
      Parameters:
      appId - the application id
      instanceId - the application instance id
      endpoint - the relative actuator path, e.g., /info
      Returns:
      the contents as JSON text
    • postToActuator

      public Object postToActuator(String appId, String instanceId, String endpoint, Map<String,Object> body)
      Description copied from interface: RuntimeOperations
      Access an HTTP POST exposed actuator resource for a deployed app instance.
      Specified by:
      postToActuator in interface RuntimeOperations
      Parameters:
      appId - the application id
      instanceId - the application instance id
      endpoint - the relative actuator path, e.g., /info
      body - map representing the data to post on request body
      Returns:
      response from actuator
    • postToUrl

      public void postToUrl(String appId, String instanceId, byte[] data, HttpHeaders headers)
      Description copied from interface: RuntimeOperations
      Provides for POST to application HTTP endpoint exposed via url property.
      Specified by:
      postToUrl in interface RuntimeOperations
      Parameters:
      appId - the application id
      instanceId - the application instance id
      data - data to send to url. The mimetype should be in the Content-Type header if important.
      headers - post request headers. This method will return an exception