public static Responder initialize ( String [ ] args ) throws ResponderConfigException { readVersionProperties ( ) ; LOGGER . info ( "Starting Argo Responder daemon process. Version " + ARGO_VERSION ) ; ResponderConfiguration config = parseCommandLine ( args ) ; if ( config == null ) { LOGGER . error ( "Invalid Responder Configuration. Terminating Responder process." ) ; return null ; } Responder responder = new Responder ( config ) ; // load up the handler classes specified in the configuration parameters try { responder . loadHandlerPlugins ( config . getProbeHandlerConfigs ( ) ) ; } catch ( ProbeHandlerConfigException e ) { throw new ResponderConfigException ( "Error loading handler plugins: " , e ) ; } // load up the transport classes specified in the configuration parameters responder . loadTransportPlugins ( config . getTransportConfigs ( ) ) ; LOGGER . info ( "Responder registering shutdown hook." ) ; ResponderShutdown hook = new ResponderShutdown ( responder ) ; Runtime . getRuntime ( ) . addShutdownHook ( hook ) ; // This needs to be sent to stdout as there is no way to force the logging // of this via the LOGGER System . out . println ( "Argo " + ARGO_VERSION + " :: " + "Responder started [" + responder . _runtimeId + "] :: Responding as [" + ( config . isHTTPSConfigured ( ) ? "Secure HTTPS" : "Non-secure HTTP" ) + "]" ) ; return responder ; }
Create a new Responder given the command line arguments .