Package play.plugins

Class PlayStatusPlugin

  • All Implemented Interfaces:
    java.lang.Comparable<PlayPlugin>

    public class PlayStatusPlugin
    extends PlayPlugin
    • Constructor Detail

      • PlayStatusPlugin

        public PlayStatusPlugin()
    • Method Detail

      • computeApplicationStatus

        public java.lang.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)
                              throws java.lang.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:
        java.lang.Exception - if cannot enhance the class
      • getStatus

        public java.lang.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