public Jashing bootstrap ( ) { if ( bootstrapped . compareAndSet ( false , true ) ) { /* bootstrap event sources* */ ServiceManager eventSources = injector . getInstance ( ServiceManager . class ) ; eventSources . startAsync ( ) ; /* bootstrap server */ Service application = injector . getInstance ( JashingServer . class ) ; application . startAsync ( ) ; Runtime . getRuntime ( ) . addShutdownHook ( shutdownHook ) ; LOGGER . info ( "Jashing has started!" ) ; } else { throw new IllegalStateException ( "Jashing already bootstrapped" ) ; } return this ; }
Bootstaps Jashing . This operation is allowed only once . Bootstrapping already started Jashing is not permitted