use of org.glassfish.jersey.server.ResourceConfig in project jersey by jersey.
the class EventListenerTest method configure.
@Override
protected Application configure() {
applicationEventListener = new AppEventListener();
final ResourceConfig resourceConfig = new ResourceConfig(MyResource.class);
resourceConfig.register(applicationEventListener);
resourceConfig.register(RequestFilter.class);
resourceConfig.register(PreMatchingRequestFilter.class);
resourceConfig.register(ResponseFilter.class);
resourceConfig.register(MyExceptionMapper.class);
resourceConfig.setApplicationName(APPLICATION_NAME);
return resourceConfig;
}
use of org.glassfish.jersey.server.ResourceConfig in project jersey by jersey.
the class MBeansTest method configure.
@Override
protected Application configure() {
final ResourceConfig resourceConfig = new ResourceConfig(TestResource.class, MyExceptionMapper.class);
resourceConfig.setApplicationName("myApplication");
resourceConfig.property("very-important", "yes");
resourceConfig.property("another-property", 48);
resourceConfig.property(ServerProperties.MONITORING_STATISTICS_MBEANS_ENABLED, true);
resourceConfig.register(StatisticsListener.class);
return resourceConfig;
}
use of org.glassfish.jersey.server.ResourceConfig in project jersey by jersey.
the class MonitoringStatisticsLocatorTest method configure.
@Override
protected Application configure() {
final ResourceConfig resourceConfig = new ResourceConfig(StatisticsResource.class, AnotherResource.class);
resourceConfig.property(ServerProperties.MONITORING_STATISTICS_ENABLED, true);
resourceConfig.property(ServerProperties.APPLICATION_NAME, "testApp");
return resourceConfig;
}
use of org.glassfish.jersey.server.ResourceConfig in project jersey by jersey.
the class ExplicitProduceTemplateTest method configure.
@Override
protected Application configure() {
enable(TestProperties.DUMP_ENTITY);
enable(TestProperties.LOG_TRAFFIC);
return new ResourceConfig(ExplicitTwoGetProducesTemplate.class, ExplicitNoProducesTemplate.class, ExplicitWildcardProducesTemplate.class, ExplicitTemplateProducesClass.class).register(MvcFeature.class).register(AbcViewProcessor.class).register(DefViewProcessor.class);
}
use of org.glassfish.jersey.server.ResourceConfig in project jersey by jersey.
the class UriConnegMappingFromProperty method configure.
@Override
protected Application configure() {
ResourceConfig rc = new ResourceConfig(UriConnegLanguageMediaTypeTest.LanguageVariantResource.class);
rc.property(ServerProperties.MEDIA_TYPE_MAPPINGS, "foo : application/foo, bar : application/bar");
rc.property(ServerProperties.LANGUAGE_MAPPINGS, "english : en, french : fr");
return rc;
}
Aggregations