Package play.plugins

Class PlayStatusPlugin

java.lang.Object
play.PlayPlugin
play.plugins.PlayStatusPlugin
All Implemented Interfaces:
Comparable<PlayPlugin>

@ParametersAreNonnullByDefault public class PlayStatusPlugin extends PlayPlugin
  • Constructor Details

    • PlayStatusPlugin

      public PlayStatusPlugin()
  • Method Details

    • computeApplicationStatus

      public String computeApplicationStatus(boolean json)
      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:
      rawInvocation in class PlayPlugin
      Parameters:
      request - The Play request
      response - The Play response
      Returns:
      true if this plugin has managed this request
      Throws:
      Exception
    • getStatus

      public String getStatus()
      Retrieve status about play core.
      Overrides:
      getStatus in class PlayPlugin
      Returns:
      the plugin status
    • getJsonStatus

      public com.google.gson.JsonObject getJsonStatus()
      Description copied from class: PlayPlugin
      Return the plugin status in JSON format
      Overrides:
      getJsonStatus in class PlayPlugin
      Returns:
      the plugin status in JSON format