private WebServer loadWebServer ( ) { WebServer webServer = null ; if ( ! Utils . isEmpty ( getParamString ( "webserver_class" ) ) ) { try { Class < ? > serviceClass = Class . forName ( getParamString ( "webserver_class" ) ) ; Method instanceMethod = serviceClass . getMethod ( "instance" , ( Class < ? > [ ] ) null ) ; webServer = ( WebServer ) instanceMethod . invoke ( null , ( Object [ ] ) null ) ; webServer . init ( RESTServlet . class . getName ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( "Error initializing WebServer: " + getParamString ( "webserver_class" ) , e ) ; } } return webServer ; }
Attempt to load the WebServer instance defined by webserver_class .