public void stop(final StopContext context) {
        super.stop(context);
        if (SarLogger.ROOT_LOGGER.isTraceEnabled()) {
            SarLogger.ROOT_LOGGER.tracef("Stopping Service: %s", context.getController().getName());
        }
        final Runnable task = new Runnable() {
            @Override
            public void run() {
                try {
                    invokeLifecycleMethod(stopMethod, context);
                } catch (Exception e) {
                    SarLogger.ROOT_LOGGER.error(SarLogger.ROOT_LOGGER.failedExecutingLegacyMethod("stop()"), e);
                } finally {
                    context.complete();
                }
            }
        };
        try {
            executorSupplier.get().submit(task);
        } catch (RejectedExecutionException e) {
            task.run();
        } finally {
            context.asynchronous();
        }
    }
public void stop(final StopContext context) {
        super.stop(context);
        if (SarLogger.ROOT_LOGGER.isTraceEnabled()) {
            SarLogger.ROOT_LOGGER.tracef("Stopping Service: %s", context.getController().getName());
        }
        final Runnable task = new Runnable() {
            @Override
            public void run() {
                try {
                    invokeLifecycleMethod(stopMethod, context);
                } catch (Exception e) {
                    SarLogger.ROOT_LOGGER.error(SarLogger.ROOT_LOGGER.failedExecutingLegacyMethod("stop()"), e);
                } finally {
                    context.complete();
                }
            }
        };
        try {
            executorSupplier.get().submit(task);
        } catch (RejectedExecutionException e) {
            task.run();
        } finally {
            context.asynchronous();
        }
    }
public void stop ( final StopContext context ) { super . stop ( context ) ; if ( SarLogger . ROOT_LOGGER . isTraceEnabled ( ) ) { SarLogger . ROOT_LOGGER . tracef ( "Stopping Service: %s" , context . getController ( ) . getName ( ) ) ; } final Runnable task = new Runnable ( ) { @ Override public void run ( ) { try { invokeLifecycleMethod ( stopMethod , context ) ; } catch ( Exception e ) { SarLogger . ROOT_LOGGER . error ( SarLogger . ROOT_LOGGER . failedExecutingLegacyMethod ( "stop()" ) , e ) ; } finally { context . complete ( ) ; } } } ; try { executorSupplier . get ( ) . submit ( task ) ; } catch ( RejectedExecutionException e ) { task . run ( ) ; } finally { context . asynchronous ( ) ; } }
{@inheritDoc}
{