public void launch ( Monitored mp ) { if ( ! lifecycle . tryToMoveTo ( Lifecycle . State . STARTING ) ) { throw new IllegalStateException ( "Already started" ) ; } monitored = mp ; Logger logger = LoggerFactory . getLogger ( getClass ( ) ) ; try { launch ( logger ) ; } catch ( Exception e ) { logger . warn ( "Fail to start {}" , getKey ( ) , e ) ; } finally { stop ( ) ; } }
Launch process and waits until it s down