Class Monitor

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable
    Direct Known Subclasses:
    OA2Monitor

    public abstract class Monitor
    extends edu.uiuc.ncsa.security.util.cli.CLITool
    Class that monitors a server. This will issue a call from the command line. Each endpoint of an OA4MP server is pingable. Making an HTTP GET with the parameter "ping" will return an HTTP 204 response (no body). Otherwise the operation will fail. The reason each endpoint is ping-able is because it is possible to replace any endpoint (e.g. writing your own authorize endpoint) and hence simply checking one of them, which is what older versions would do, is in sufficient. This monitor does only check a single endpoint, but you can have multiple ones. The configuration is identical to that of any other client. The basic ping now is against the access token endpoint, since various servers (OAuth 1.0a, OAuth 2.0) may or may not have initialization or authorization endpoints that support this, such as in the case where there is a custom authorization module.

    Created by Jeff Gaynor
    on 8/26/11 at 5:15 PM

    • Field Summary

      • Fields inherited from class edu.uiuc.ncsa.security.util.cli.CLITool

        CONFIG_FILE_LONG_OPTION, CONFIG_FILE_OPTION, CONFIG_NAME_ACTION, CONFIG_NAME_LONG_OPTION, CONFIG_NAME_OPTION, DEBUG_LONG_OPTION, DEBUG_OPTION, DEFAULT_LOG_FILE, HELP_LONG_OPTION, HELP_OPTION, LOG_FILE_LONG_OPTION, LOG_FILE_OPTION, NO_ACTION, VERBOSE_LONG_OPTION, VERBOSE_OPTION
    • Constructor Summary

      Constructors 
      Constructor Description
      Monitor()  
    • Constructor Detail

      • Monitor

        public Monitor()
    • Method Detail

      • doIt

        public void doIt()
                  throws Exception
        Specified by:
        doIt in class edu.uiuc.ncsa.security.util.cli.CLITool
        Throws:
        Exception
      • getClientEnvironment

        public org.oa4mp.client.api.ClientEnvironment getClientEnvironment()
                                                                    throws Exception
        Throws:
        Exception
      • initialize

        public void initialize()
                        throws Exception
        Overrides:
        initialize in class edu.uiuc.ncsa.security.util.cli.CLITool
        Throws:
        Exception
      • getComponentName

        public String getComponentName()
        Specified by:
        getComponentName in class edu.uiuc.ncsa.security.util.cli.CLITool
      • help

        public void help()
        Specified by:
        help in class edu.uiuc.ncsa.security.util.cli.CLITool
      • mailNotificationsOn

        protected boolean mailNotificationsOn()
      • sendNotification

        public void sendNotification​(Throwable t)
      • getOptions

        protected org.apache.commons.cli.Options getOptions()
        Overrides:
        getOptions in class edu.uiuc.ncsa.security.util.cli.CLITool