@Controller @RequestMapping(value="/inter-node/api") public class ApiController extends Object
Controller handling requests to the inter-node API. This controller
implements a REST-style API using the JSON protocol and exposes it at the
/inter-node/api URI.
This controller does not check the authentication or authorization of requests. These checks are expected to be made before a request is passed to this controller.
| Constructor and Description |
|---|
ApiController() |
| Modifier and Type | Method and Description |
|---|---|
ArchivingStatusResponse |
archivingStatus()
Returns a response with the archiving status of all channels handled by
this server.
|
ChannelStatus |
archivingStatusForChannel(String channelName)
Returns the archiving status of the specified channel.
|
CurrentSystemTimeResponse |
currentSystemTime()
Returns a response with the current system time (as returned by
System.currentTimeMillis()). |
ListenableFuture<RunArchiveConfigurationCommandsResponse> |
runArchiveConfigurationCommands(RunArchiveConfigurationCommandsRequest request)
Runs archive configuration commands on this server.
|
void |
setArchiveConfigurationService(ArchiveConfigurationService archiveConfigurationService)
Sets the archive configuration service used by this controller.
|
void |
setArchivingService(ArchivingService archivingService)
Sets the archiving service.
|
void |
setChannelInformationCache(ChannelInformationCache channelInformationCache)
Sets the channel information cache.
|
ListenableFuture<Void> |
updateChannelInformation(UpdateChannelInformationRequest request)
Updates the channel cache and forwards the update to other servers if
requested.
|
@Autowired public void setArchiveConfigurationService(ArchiveConfigurationService archiveConfigurationService)
archiveConfigurationService - archive configuration service for this server.@Autowired public void setArchivingService(ArchivingService archivingService)
archivingService - archiving service for this server.@Autowired public void setChannelInformationCache(ChannelInformationCache channelInformationCache)
channelInformationCache - channel information cache for this server.@RequestMapping(value="/1.0/archiving-status", method=GET) @ResponseBody public ArchivingStatusResponse archivingStatus()
@RequestMapping(value="/1.0/archiving-status-for-channel/{channelName}", method=GET) @ResponseBody public ChannelStatus archivingStatusForChannel(@PathVariable String channelName)
null if the specified channel is not known by this
server's archiving service.channelName - name of the channel.null if
the specified channel is not known.@RequestMapping(value="/1.0/current-system-time", method=GET) @ResponseBody public CurrentSystemTimeResponse currentSystemTime()
System.currentTimeMillis()).@RequestMapping(value="/1.0/run-archive-configuration-commands", method=POST) @ResponseBody public ListenableFuture<RunArchiveConfigurationCommandsResponse> runArchiveConfigurationCommands(@RequestBody RunArchiveConfigurationCommandsRequest request)
request - request object wrapping the commands that shall be executed by
this server's ArchiveConfigurationService.request exposed through a future.
This allows the container to reuse the calling thread while
waiting for the operation to finish.@RequestMapping(value="/1.0/update-channel-information", method=POST) @ResponseBody public ListenableFuture<Void> updateChannelInformation(@RequestBody UpdateChannelInformationRequest request)
request - channel-information update request.Copyright © 2011–2017 aquenos GmbH. All rights reserved.