public void start ( boolean rethrowExceptions ) throws Exception { log . info ( "Starting up REST..." ) ; try { createWebServer ( ) ; if ( server == null ) { isShutdownRequested = true ; errorCode = 100 ; } else { server . start ( ) ; } } catch ( Exception ex ) { log . error ( "could not start ANNIS REST service" , ex ) ; isShutdownRequested = true ; errorCode = 100 ; if ( rethrowExceptions ) { if ( ! ( ex instanceof AnnisException ) && ex . getCause ( ) instanceof AnnisException ) { throw ( ( AnnisException ) ex . getCause ( ) ) ; } else { throw ( ex ) ; } } } }
Creates and starts the server