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.voidpostToUrl(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:
statusin interfaceRuntimeOperations- Returns:
- the runtime information about all deployed apps.
-
status
- Specified by:
statusin 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:
streamStatusin interfaceRuntimeOperations- Parameters:
streamNames- deployed stream names- Returns:
- the runtime information about the deployed streams their apps and instances.
-
getFromActuator
Description copied from interface:RuntimeOperationsAccess an HTTP GET exposed actuator resource for a deployed app instance.- Specified by:
getFromActuatorin 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:RuntimeOperationsAccess an HTTP POST exposed actuator resource for a deployed app instance.- Specified by:
postToActuatorin interfaceRuntimeOperations- Parameters:
appId- the application idinstanceId- the application instance idendpoint- the relative actuator path, e.g.,/infobody- map representing the data to post on request body- Returns:
- response from actuator
-
postToUrl
Description copied from interface:RuntimeOperationsProvides for POST to application HTTP endpoint exposed via url property.- Specified by:
postToUrlin 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
-