Class RuntimeTemplate
java.lang.Object
org.springframework.cloud.dataflow.rest.client.RuntimeTemplate
- All Implemented Interfaces:
RuntimeOperations
Implementation for
RuntimeOperations
.- Author:
- Eric Bottard, Mark Fisher, Christian Tzolov, Chris Bono, Corneil du Plessis
-
Method Summary
Modifier and TypeMethodDescriptiongetFromActuator
(String appId, String instanceId, String endpoint) Access an HTTP GET exposed actuator resource for a deployed app instance.Access an HTTP POST exposed actuator resource for a deployed app instance.void
postToUrl
(String appId, String instanceId, byte[] data, HttpHeaders headers) Provides for POST to application HTTP endpoint exposed via url property.org.springframework.hateoas.PagedModel<AppStatusResource>
status()
org.springframework.hateoas.PagedModel<StreamStatusResource>
streamStatus
(String... streamNames)
-
Method Details
-
status
- Specified by:
status
in interfaceRuntimeOperations
- Returns:
- the runtime information about all deployed apps.
-
status
- Specified by:
status
in interfaceRuntimeOperations
- 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 interfaceRuntimeOperations
- Parameters:
streamNames
- deployed stream names- Returns:
- the runtime information about the deployed streams their apps and instances.
-
getFromActuator
Description copied from interface:RuntimeOperations
Access an HTTP GET exposed actuator resource for a deployed app instance.- Specified by:
getFromActuator
in interfaceRuntimeOperations
- Parameters:
appId
- the application idinstanceId
- the application instance idendpoint
- 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 interfaceRuntimeOperations
- Parameters:
appId
- the application idinstanceId
- the application instance idendpoint
- the relative actuator path, e.g.,/info
body
- map representing the data to post on request body- Returns:
- response from actuator
-
postToUrl
Description copied from interface:RuntimeOperations
Provides for POST to application HTTP endpoint exposed via url property.- Specified by:
postToUrl
in interfaceRuntimeOperations
- Parameters:
appId
- the application idinstanceId
- the application instance iddata
- 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
-