Package play.plugins
Class PlayStatusPlugin
java.lang.Object
play.PlayPlugin
play.plugins.PlayStatusPlugin
- All Implemented Interfaces:
Comparable<PlayPlugin>
-
Field Summary
Fields inherited from class play.PlayPlugin
index -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeApplicationStatus(boolean json) Get the application statuscom.google.gson.JsonObjectReturn the plugin status in JSON formatRetrieve status about play core.booleanrawInvocation(Http.Request request, Http.Response response, Scope.Session session, Scope.RenderArgs renderArgs, Scope.Flash flash) Intercept /@status and check that the Authorization header is valid.Methods inherited from class play.PlayPlugin
afterActionInvocation, afterApplicationStart, afterInvocation, beforeActionInvocation, beforeInvocation, bind, compareTo, detectChange, disable, getMessage, isEnabled, loadTemplate, onActionInvocationException, onActionInvocationFinally, onActionInvocationResult, onActionInvocationResult, onApplicationStart, onApplicationStop, onConfigurationRead, onInvocationSuccess, onJobInvocationException, onJobInvocationFinally, onLoad, routeRequest
-
Constructor Details
-
PlayStatusPlugin
public PlayStatusPlugin()
-
-
Method Details
-
computeApplicationStatus
Get the application status- Parameters:
json- true if the status should be return in JSON- Returns:
- application status
-
rawInvocation
public boolean rawInvocation(Http.Request request, Http.Response response, Scope.Session session, Scope.RenderArgs renderArgs, Scope.Flash flash) throws Exception Intercept /@status and check that the Authorization header is valid. Then ask each plugin for a status dump and send it over the HTTP response.You can ask the /@status using the authorization header and putting your status secret key in it. Prior to that you would be required to start play with a
-DstatusKey=yourkey- Overrides:
rawInvocationin classPlayPlugin- Parameters:
request- The Play requestresponse- The Play response- Returns:
- true if this plugin has managed this request
- Throws:
Exception
-
getStatus
Retrieve status about play core.- Overrides:
getStatusin classPlayPlugin- Returns:
- the plugin status
-
getJsonStatus
public com.google.gson.JsonObject getJsonStatus()Description copied from class:PlayPluginReturn the plugin status in JSON format- Overrides:
getJsonStatusin classPlayPlugin- Returns:
- the plugin status in JSON format
-