use of org.glassfish.jersey.server.ApplicationHandler in project jersey by jersey.
the class JsonProcessingAutoDiscoverableServerTest method _test.
private void _test(final String response, final Boolean globalDisable, final Boolean serverDisable) throws Exception {
final ResourceConfig resourceConfig = new ResourceConfig(Resource.class, Filter.class);
if (globalDisable != null) {
resourceConfig.property(CommonProperties.JSON_PROCESSING_FEATURE_DISABLE, globalDisable);
}
if (serverDisable != null) {
resourceConfig.property(ServerProperties.JSON_PROCESSING_FEATURE_DISABLE, serverDisable);
}
final ApplicationHandler app = new ApplicationHandler(resourceConfig);
final URI baseUri = URI.create("/");
assertEquals(response, app.apply(new ContainerRequest(baseUri, baseUri, "GET", null, new MapPropertiesDelegate())).get().getEntity());
}
use of org.glassfish.jersey.server.ApplicationHandler in project jersey by jersey.
the class GrizzlyHttpContainer method reload.
@Override
public void reload(final ResourceConfig configuration) {
appHandler.onShutdown(this);
appHandler = new ApplicationHandler(configuration, new GrizzlyBinder());
appHandler.onReload(this);
appHandler.onStartup(this);
cacheConfigSetStatusOverSendError();
cacheConfigEnableLeadingContextPathSlashes();
}
use of org.glassfish.jersey.server.ApplicationHandler in project jersey by jersey.
the class SimpleContainer method reload.
@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);
}
use of org.glassfish.jersey.server.ApplicationHandler in project jersey by jersey.
the class JdkHttpHandlerContainer method reload.
@Override
public void reload(final ResourceConfig configuration) {
appHandler.onShutdown(this);
appHandler = new ApplicationHandler(configuration);
appHandler.onReload(this);
appHandler.onStartup(this);
}
use of org.glassfish.jersey.server.ApplicationHandler in project divide by HiddenStage.
the class AuthServerHelper method init.
public void init(String url) throws Exception {
URI uri = URI.create(url);
ApplicationHandler h = new ApplicationHandler(TestApplication.class);
WebContainerFactory factory = new WebContainerFactory();
factory.enableEncrementPort(false);
container = factory.create(uri, h);
container.start();
}
Aggregations