@Override
    public synchronized void stop(final StopContext context) {
        final boolean shutdownServers = runningModeControl.getRestartMode() == RestartMode.SERVERS;
        if (shutdownServers) {
            Runnable task = new Runnable() {
                @Override
                public void run() {
                    try {
                        serverInventory.shutdown(true, -1, true); // TODO graceful shutdown
                        serverInventory = null;
                        // client.getValue().setServerInventory(null);
                    } finally {
                        serverCallback.getValue().setCallbackHandler(null);
                        context.complete();
                    }
                }
            };
            try {
                executorService.getValue().execute(task);
            } catch (RejectedExecutionException e) {
                task.run();
            } finally {
                context.asynchronous();
            }
        } else {
            // We have to set the shutdown flag in any case
            serverInventory.shutdown(false, -1, true);
            serverInventory = null;
        }
    }
@ Override public synchronized void stop ( final StopContext context ) { final boolean shutdownServers = runningModeControl . getRestartMode ( ) == RestartMode . SERVERS ; if ( shutdownServers ) { Runnable task = new Runnable ( ) { @ Override public void run ( ) { try { serverInventory . shutdown ( true , - 1 , true ) ; serverInventory = null ; } finally { serverCallback . getValue ( ) . setCallbackHandler ( null ) ; context . complete ( ) ; } } } ; try { executorService . getValue ( ) . execute ( task ) ; } catch ( RejectedExecutionException e ) { task . run ( ) ; } finally { context . asynchronous ( ) ; } } else { serverInventory . shutdown ( false , - 1 , true ) ; serverInventory = null ; } }
Stops all servers.

{@inheritDoc}