public static void shutdownStandalone ( final ModelControllerClient client , final int timeout ) throws IOException { final ModelNode op = Operations . createOperation ( "shutdown" ) ; op . get ( "timeout" ) . set ( timeout ) ; final ModelNode response = client . execute ( op ) ; if ( Operations . isSuccessfulOutcome ( response ) ) { while ( true ) { if ( isStandaloneRunning ( client ) ) { try { TimeUnit . MILLISECONDS . sleep ( 20L ) ; } catch ( InterruptedException e ) { LOGGER . trace ( "Interrupted during sleep" , e ) ; } } else { break ; } } } else { throw new OperationExecutionException ( op , response ) ; } }
Shuts down a standalone server .