public class SystemController extends BasicController
Modifier and Type | Field and Description |
---|---|
static String |
PERMISSION_SYSTEM_CONSOLE
Describes the permission required to access the system console.
|
static String |
PERMISSION_SYSTEM_STATE
Describes the permission required to view the system state.
|
static String |
PERMISSION_SYSTEM_TIMING
Describes the permission required to access the system console.
|
defaultRoute
Constructor and Description |
---|
SystemController() |
Modifier and Type | Method and Description |
---|---|
void |
console(WebContext ctx) |
void |
fail(WebContext ctx)
Can be used to forcefully create an error.
|
void |
info(WebContext ctx)
Reports useful information for the current user agent and request.
|
void |
metric(WebContext ctx,
String key)
Sends the value for the requested metric for /system/metric/[name]
|
void |
monitorNode(WebContext ctx)
Determines if there is currently an ALARM present or not for: /system/monitor
Either reports OK or ERROR, if the cluster state is RED for at least two intervals (minutes).
|
void |
ok(WebContext ctx)
Simply responds with OK for /system/ok
This can be used to monitoring tools the check the system health.
|
void |
reset(WebContext ctx)
Clears the server and client session.
|
void |
state(WebContext ctx)
Reports the system and cluster state.
|
void |
timing(WebContext ctx)
Provides a list of recorded micro timings.
|
assertNotNull, assertPermission, fail, getUser, hasPermission, onError, showDeletedMessage, showSavedMessage
public static final String PERMISSION_SYSTEM_CONSOLE
public static final String PERMISSION_SYSTEM_TIMING
public static final String PERMISSION_SYSTEM_STATE
public void console(WebContext ctx)
public void ok(WebContext ctx)
This can be used to monitoring tools the check the system health.
ctx
- the request being handledpublic void monitorNode(WebContext ctx)
Either reports OK or ERROR, if the cluster state is RED for at least two intervals (minutes).
ctx
- the request being handledpublic void metric(WebContext ctx, String key)
ctx
- the request being handledkey
- the name of the metric to fetchpublic void fail(WebContext ctx)
ctx
- the current requestpublic void info(WebContext ctx)
This will output all headers and session information available for the current request
ctx
- the current requestpublic void reset(WebContext ctx)
Clears all session data available for the current request.
ctx
- the current requestpublic void state(WebContext ctx)
ctx
- the current requestpublic void timing(WebContext ctx)
ctx
- the current requestCopyright © 2018. All rights reserved.