Package ch.psi.wica.controllers
Class WicaChannelPutController
java.lang.Object
ch.psi.wica.controllers.WicaChannelPutController
Provides a SpringBoot REST Controller to handle PUT operations on the
{code /ca/channel} endpoint.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
org.springframework.http.ResponseEntity
<String> putChannelValue
(String channelName, Integer timeoutInMillis, String channelValue, jakarta.servlet.http.HttpServletRequest httpServletRequest) Handles an HTTP PUT request to set the value of the specified channel.
-
Method Details
-
putChannelValue
@PutMapping(value="/{channelName}", consumes="text/plain", produces="text/plain") public org.springframework.http.ResponseEntity<String> putChannelValue(@PathVariable String channelName, @RequestParam(value="timeout",required=false) Integer timeoutInMillis, @RequestBody String channelValue, jakarta.servlet.http.HttpServletRequest httpServletRequest) Handles an HTTP PUT request to set the value of the specified channel.- Parameters:
channelName
- the name of the channel whose value is to be changed.timeoutInMillis
- the timeout to be applied when attempting to get the channel value from the underlying data source. If this optional parameter is not provided then the configured default value will be used.channelValue
- the string representation of the new value.httpServletRequest
- contextual information for the request; used for statistics collection only.- Returns:
- ResponseEntity set to return an HTTP status code of 'OK' (= 200) if the put operation completes successfully or 'Internal Server Error' (= 500) if a timeout occurs. When successful the body of the response contains the string "OK". When unsuccessful the response header 'X-WICA-ERROR' is written with a description of the error.
-
handleException
-