@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration); appHandler.onReload(this); appHandler.onStartup(this); }
@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.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, new GrizzlyBinder()); appHandler.onReload(this); appHandler.onStartup(this); cacheConfigSetStatusOverSendError(); cacheConfigEnableLeadingContextPathSlashes(); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration.register(new JettyBinder())); appHandler.onReload(this); appHandler.onStartup(this); cacheConfigSetStatusOverSendError(); }
/** * 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"); } }
@Override public void reload(ResourceConfig configuration) { LOG.info("reloading container..."); appHandler.onShutdown(this); appHandler = createNewApplicationHandler(configuration); appHandler.onReload(this); appHandler.onStartup(this); LOG.info("reloaded container"); }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration); appHandler.onReload(this); appHandler.onStartup(this); }
/** * Reload the hosted Jersey application using a new {@link ResourceConfig * configuration}. * * @param configuration new configuration used for the reload. */ @Override public void reload(ResourceConfig configuration) { ApplicationHandler applicationHandler = new ApplicationHandler(configuration, null, locator); applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler); getApplicationHandler().onReload(this); applicationHandler.onStartup(this); }
/** * Reload the hosted Jersey application using a new {@link ResourceConfig * configuration}. * * @param configuration new configuration used for the reload. */ @Override public void reload(ResourceConfig configuration) { ApplicationHandler applicationHandler = new ApplicationHandler(configuration, null, locator); applicationHandlerDelegate = new DefaultApplicationHandlerDelegate(applicationHandler); getApplicationHandler().onReload(this); applicationHandler.onStartup(this); }
@Test public void reload_ConfigGiven_ShouldReloadNewAppHandler() { ResourceConfig config = new ApplicationHandler().getConfiguration(); ApplicationHandler newAppHandler = mock(ApplicationHandler.class); doReturn(newAppHandler).when(container).createNewApplicationHandler(any()); container.reload(config); verify(newAppHandler, times(1)).onReload(container); }
/** * 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"); }
@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); }
/** * 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"); } }
@Override public void reload(final ResourceConfig configuration) { appHandler.onShutdown(this); appHandler = new ApplicationHandler(configuration, new GrizzlyBinder()); appHandler.onReload(this); appHandler.onStartup(this); cacheConfigSetStatusOverSendError(); cacheConfigEnableLeadingContextPathSlashes(); }