/** * Inform this container that the server is being stopped. * * This method must be implicitly called before the server containing this container is stopped. */ void onServerStop() { this.appHandler.onShutdown(this); }
/** * Inform this container that the server is being stopped. * <p/> * This method must be implicitly called before the server containing this container is stopped. */ void onServerStop() { appHandler.onShutdown(this); scheduler.shutdown(); }
@Override public void destroy() { super.destroy(); appHandler.onShutdown(this); appHandler = null; }
@Override public void operationComplete(Future<? super Void> future) throws Exception { container.getApplicationHandler().onShutdown(container); bossGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); } });
@Override public void operationComplete(Future<? super Void> future) throws Exception { container.getApplicationHandler().onShutdown(container); bossGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); } });
/** * Inform this container that the server is being stopped. * This method must be implicitly called before the server containing this container is stopped. * * @throws java.lang.Exception if a problem occurred during server shutdown. */ @Override public void doStop() throws Exception { super.doStop(); appHandler.onShutdown(this); appHandler = null; }
@Override public void reload(ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration); appHandler.onReload(this); appHandler.onStartup(this); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration); appHandler.onReload(this); appHandler.onStartup(this); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration.register(new SimpleBinder())); scheduler = new ScheduledThreadPoolExecutor(2, new DaemonFactory(TimeoutDispatcher.class)); appHandler.onReload(this); appHandler.onStartup(this); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration.register(new JettyBinder())); appHandler.onReload(this); appHandler.onStartup(this); cacheConfigSetStatusOverSendError(); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration, new GrizzlyBinder()); appHandler.onReload(this); appHandler.onStartup(this); cacheConfigSetStatusOverSendError(); cacheConfigEnableLeadingContextPathSlashes(); }
@Override public void destroy() { log.info("Jersey filter destroy"); jersey.onShutdown(this); }
/** * Shuts down and restarts the application handler in the current container. The <code>ApplicationHandler</code> * object is re-initialized with the <code>Application</code> object initially set in the <code>LambdaContainer.getInstance()</code> * call. */ @Override public void reload() { Timer.start("JERSEY_RELOAD_DEFAULT"); jersey.onShutdown(this); jersey = new ApplicationHandler(app); jersey.onReload(this); jersey.onStartup(this); Timer.stop("JERSEY_RELOAD_DEFAULT"); }
/** * Restarts the application handler and configures a different <code>Application</code> object. The new application * resets the one currently configured in the container. * @param resourceConfig An initialized Application */ @Override public void reload(ResourceConfig resourceConfig) { Timer.start("JERSEY_RELOAD_CONFIG"); jersey.onShutdown(this); app = resourceConfig; jersey = new ApplicationHandler(resourceConfig); jersey.onReload(this); jersey.onStartup(this); Timer.stop("JERSEY_RELOAD_CONFIG"); } }
/** * Inform this container that the server is being stopped. * * This method must be implicitly called before the server containing this container is stopped. */ void onServerStop() { this.appHandler.onShutdown(this); }
@Override public void destroy() { log.info("Jersey filter destroy"); jersey.onShutdown(this); }
/** * Inform this container that the server is being stopped. * <p/> * This method must be implicitly called before the server containing this container is stopped. */ void onServerStop() { appHandler.onShutdown(this); scheduler.shutdown(); }
@Override public void destroy() { super.destroy(); appHandler.onShutdown(this); appHandler = null; }
@Test public void onShutdown_ShouldShutdownAppHandler() { container.onShutdown(); verify(appHandler, times(1)).onShutdown(container); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration, new GrizzlyBinder()); appHandler.onReload(this); appHandler.onStartup(this); cacheConfigSetStatusOverSendError(); cacheConfigEnableLeadingContextPathSlashes(); }