@Controller @RequestMapping(value="/archive-access/api/1.0/archive") public class Api10Controller extends Object
/archive-access/api/1.0/archive.| Constructor and Description |
|---|
Api10Controller() |
| Modifier and Type | Method and Description |
|---|---|
void |
archiveInfo(HttpServletRequest request,
HttpServletResponse response)
Generates a list of archives served by this server.
|
void |
channelsByPattern(HttpServletRequest request,
HttpServletResponse response)
Generates a list of channel names that match the specified pattern.
|
void |
channelsByRegExp(HttpServletRequest request,
HttpServletResponse response)
Generates a list of channel names that match the specified regular
expression.
|
void |
samples(HttpServletRequest request,
HttpServletResponse response,
long start,
long end,
Integer count)
Retrieves and returns samples for a specific channel from the archive.
|
void |
setArchiveAccessService(ArchiveAccessService archiveAccessService)
Sets the archive access service.
|
void |
setChannelInformationCache(ChannelInformationCache channelInformationCache)
Sets the channel information cache.
|
void |
setControlSystemSupportRegistry(ControlSystemSupportRegistry controlSystemSupportRegistry)
Sets the control-system support registry.
|
@Autowired public void setArchiveAccessService(ArchiveAccessService archiveAccessService)
archiveAccessService - archive access service for retrieving samples.@Autowired public void setChannelInformationCache(ChannelInformationCache channelInformationCache)
ChannelMetaDataDAO.ChannelInformation objects from the database without having to
query the database every time. Typically, this method is called
automatically by the Spring container.channelInformationCache - channel information cache for getting
ChannelMetaDataDAO.ChannelInformation objects.@Autowired public void setControlSystemSupportRegistry(ControlSystemSupportRegistry controlSystemSupportRegistry)
controlSystemSupportRegistry - control-system support registry for this archiving server.@RequestMapping(value="/", method=GET) @ResponseBody public void archiveInfo(HttpServletRequest request, HttpServletResponse response) throws IOException
request - HTTP servlet request. The request is used to check whether the
"prettyPrint" option has been specified by the client.response - HTTP servlet response. The HTTP servlet response is used for
writing the response. directlyIOException - if there is an I/O error while writing the response.@RequestMapping(value="/1/channels-by-pattern/**", method=GET) @ResponseBody public void channelsByPattern(HttpServletRequest request, HttpServletResponse response) throws IOException
request - HTTP servlet request. The request is used to extract the
pattern from the request URI and to check whether the
"prettyPrint" option has been specified by the client.response - HTTP servlet response. The HTTP servlet response is used for
writing the response. directlyIOException - if there is an I/O error while writing the response.@RequestMapping(value="/1/channels-by-regexp/**", method=GET) @ResponseBody public void channelsByRegExp(HttpServletRequest request, HttpServletResponse response) throws IOException
Pattern.compile(String).request - HTTP servlet request. The request is used to extract the
regular expression from the request URI and to check whether
the "prettyPrint" option has been specified by the client.response - HTTP servlet response. The HTTP servlet response is used for
writing the response. directlyIOException - if there is an I/O error while writing the response.@RequestMapping(value="/1/samples/**", method=GET) @ResponseBody public void samples(HttpServletRequest request, HttpServletResponse response, @RequestParam long start, @RequestParam long end, @RequestParam(required=false) Integer count) throws IOException
request - HTTP servlet request. The request is used to extract the
channel name from the request URI and to check whether the
"prettyPrint" option has been specified by the client.response - HTTP servlet response. The HTTP servlet response is used for
writing the response. directlystart - start of the interval for which samples shall be retrieved.end - end of the interval for which samples shall be retrieved.count - desired number of samples. A decimation level providing a
number of samples that is as close to the specified number of
samples as possible is chosen. If null, only raw
samples are considered.IOException - if there is an I/O error while writing the response.Copyright © 2011–2017 aquenos GmbH. All rights reserved.