Package org.glassfish.grizzly

Examples of org.glassfish.grizzly.ShutdownContext


        // same thread otherwise use one additional thread to invoke them.
        final Map<ShutdownContext,GracefulShutdownListener> contexts =
                new HashMap<ShutdownContext,GracefulShutdownListener>(listenerCount);
        if (gracePeriod <= 0) {
            for (final GracefulShutdownListener l : shutdownListeners) {
                final ShutdownContext ctx = createContext(contexts, l, shutdownLatch);
                l.shutdownRequested(ctx);
            }
        } else {
            shutdownService.execute(new Runnable() {
                @Override
                public void run() {
                    for (final GracefulShutdownListener l : shutdownListeners) {
                        final ShutdownContext ctx = createContext(contexts, l, shutdownLatch);
                        l.shutdownRequested(ctx);
                    }
                }
            });
        }
View Full Code Here


    }

    private ShutdownContext createContext(final Map<ShutdownContext,GracefulShutdownListener> contexts,
                                          final GracefulShutdownListener listener,
                                          final CountDownLatch shutdownLatch) {
        final ShutdownContext ctx = new ShutdownContext() {
            boolean isNotified;

            @Override
            public Transport getTransport() {
                return transport;
View Full Code Here

        // same thread otherwise use one additional thread to invoke them.
        final Map<ShutdownContext,GracefulShutdownListener> contexts =
                new HashMap<ShutdownContext,GracefulShutdownListener>(listenerCount);
        if (gracePeriod <= 0) {
            for (final GracefulShutdownListener l : shutdownListeners) {
                final ShutdownContext ctx = createContext(contexts, l, shutdownLatch);
                l.shutdownRequested(ctx);
            }
        } else {
            shutdownService.execute(new Runnable() {
                @Override
                public void run() {
                    for (final GracefulShutdownListener l : shutdownListeners) {
                        final ShutdownContext ctx = createContext(contexts, l, shutdownLatch);
                        l.shutdownRequested(ctx);
                    }
                }
            });
        }
View Full Code Here

    }

    private ShutdownContext createContext(final Map<ShutdownContext,GracefulShutdownListener> contexts,
                                          final GracefulShutdownListener listener,
                                          final CountDownLatch shutdownLatch) {
        final ShutdownContext ctx = new ShutdownContext() {
            boolean isNotified;

            @Override
            public Transport getTransport() {
                return transport;
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.ShutdownContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.