Class MonitoringRestControllerBase
- java.lang.Object
-
- org.craftercms.commons.monitoring.rest.MonitoringRestControllerBase
-
@RestController public abstract class MonitoringRestControllerBase extends Object
Base controller for all monitoring related APIs- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description static String
MEMORY_URL
static String
ROOT_URL
static String
STATUS_URL
static String
VERSION_URL
-
Constructor Summary
Constructors Constructor Description MonitoringRestControllerBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
getConfiguredToken()
MemoryInfo
getCurrentMemory(String token)
StatusInfo
getCurrentStatus(String token)
VersionInfo
getCurrentVersion(String token)
-
-
-
Field Detail
-
ROOT_URL
public static final String ROOT_URL
- See Also:
- Constant Field Values
-
MEMORY_URL
public static final String MEMORY_URL
- See Also:
- Constant Field Values
-
STATUS_URL
public static final String STATUS_URL
- See Also:
- Constant Field Values
-
VERSION_URL
public static final String VERSION_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCurrentMemory
@GetMapping("/monitoring/memory") public MemoryInfo getCurrentMemory(@RequestParam(name="token",required=true) String token) throws InvalidManagementTokenException
- Throws:
InvalidManagementTokenException
-
getCurrentStatus
@GetMapping("/monitoring/status") public StatusInfo getCurrentStatus(@RequestParam(name="token",required=true) String token) throws InvalidManagementTokenException
- Throws:
InvalidManagementTokenException
-
getCurrentVersion
@GetMapping("/monitoring/version") public VersionInfo getCurrentVersion(@RequestParam(name="token",required=true) String token) throws InvalidManagementTokenException, IOException
-
getConfiguredToken
protected abstract String getConfiguredToken()
-
-