Class WicaChannelGetController

java.lang.Object
ch.psi.wica.controllers.WicaChannelGetController

@RestController @RequestMapping("/ca/channel") class WicaChannelGetController extends Object
Provides a SpringBoot REST Controller to handle GET operations on the {code /ca/channel} endpoint.
  • Method Details

    • getChannelValue

      @GetMapping(value="/{channelName}", produces="application/json") public org.springframework.http.ResponseEntity<String> getChannelValue(@PathVariable String channelName, @RequestParam(value="timeout",required=false) Integer timeoutInMillis, @RequestParam(value="numericScale",required=false) Integer numericScale, @RequestParam(value="fieldsOfInterest",required=false) String fieldsOfInterest, jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Handles an HTTP GET request to return the metadata of the specified channel.
      Parameters:
      channelName - the name of the channel whose metadata is to be fetched.
      timeoutInMillis - the timeout to be applied when attempting to get the channel metadata from the underlying data source. If this optional parameter is not provided then the configured default value will be used.
      numericScale - the default number of digits after the decimal point when getting the current metadata of a wica channel. If this optional parameter is not provided then the configured default value will be used.
      fieldsOfInterest - the default fields of interest to be returned when getting the current metadata of a wica channel. If this optional parameter is not provided then the configured default value will be used.
      httpServletRequest - contextual information for the request; used for statistics collection only.
      Returns:
      ResponseEntity set to return an HTTP status code of 'OK' (= 200) and a body which includes the JSON string representation of the current channel value. If a timeout occurred the JSON representation will be set to show that the channel metedata is currently UNKNOWN.
    • getChannelMetadata

      @GetMapping(value="/metadata/{channelName}", produces="application/json") public org.springframework.http.ResponseEntity<String> getChannelMetadata(@PathVariable String channelName, @RequestParam(value="timeout",required=false) Integer timeoutInMillis, @RequestParam(value="numericScale",required=false) Integer numericScale, @RequestParam(value="fieldsOfInterest",required=false) String fieldsOfInterest, jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Handles an HTTP GET request to return the metadata of the specified channel.
      Parameters:
      channelName - the name of the channel whose metadata is to be fetched.
      timeoutInMillis - the timeout to be applied when attempting to get the channel metadata from the underlying data source. If this optional parameter is not provided then the configured default will be used.
      numericScale - the default number of digits after the decimal point when getting the current metadata for a wica channel. If this optional parameter is not provided then the configured default will be used.
      fieldsOfInterest - the default fields of interest to be returned when getting the current metadata for a wica channel. If this optional parameter is not provided then the configured default will be used.
      httpServletRequest - contextual information for the request; used for statistics collection only.
      Returns:
      ResponseEntity set to return an HTTP status code of 'OK' (= 200) and a body which includes the JSON string representation of the current channel value. If a timeout occurred the JSON representation will be set to show that the channel is currently disconnected.
    • handleException

      @ExceptionHandler(java.lang.Exception.class) public void handleException(Exception ex)