Package org.glassfish.jersey.server

Examples of org.glassfish.jersey.server.ResourceConfig.property()


        @Override
        public Application configure() {
            StatisticsListener.reset();
            final ResourceConfig resourceConfig = new ResourceConfig(TestResource.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;
        }
View Full Code Here


        public Application configure() {
            StatisticsListener.reset();
            final ResourceConfig resourceConfig = new ResourceConfig(TestResource.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;
        }
View Full Code Here

            StatisticsListener.reset();
            final ResourceConfig resourceConfig = new ResourceConfig(TestResource.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;
        }

        @Override
View Full Code Here

public class MBeansTest extends JerseyTest {
    @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;
    }
View Full Code Here

    @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;
    }
View Full Code Here

    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;
    }

View Full Code Here

    private static Application createApplication(boolean forceEnable, boolean enableMonitoring,
                                                 boolean enableMonitoringStatistics, boolean enableMonitoringStatisticsMBeans,
                                                 Boolean monitoringEnabled, Boolean monitoringStatisticsEnabled,
                                                 Boolean monitoringStatisticsMBeansEnabled) {
        final ResourceConfig resourceConfig = new ResourceConfig(Resource.class);
        resourceConfig.property(ServerProperties.APPLICATION_NAME, "testApp");
        resourceConfig.property(FORCE_ENABLE, forceEnable);
        if (enableMonitoring) {
            resourceConfig.property(ENABLE_MONITORING, true);
        }
        if (enableMonitoringStatistics) {
View Full Code Here

                                                 boolean enableMonitoringStatistics, boolean enableMonitoringStatisticsMBeans,
                                                 Boolean monitoringEnabled, Boolean monitoringStatisticsEnabled,
                                                 Boolean monitoringStatisticsMBeansEnabled) {
        final ResourceConfig resourceConfig = new ResourceConfig(Resource.class);
        resourceConfig.property(ServerProperties.APPLICATION_NAME, "testApp");
        resourceConfig.property(FORCE_ENABLE, forceEnable);
        if (enableMonitoring) {
            resourceConfig.property(ENABLE_MONITORING, true);
        }
        if (enableMonitoringStatistics) {
            resourceConfig.property(ENABLE_MONITORING_STATISTICS, true);
View Full Code Here


    @Override
    protected Application configure() {
        final ResourceConfig resourceConfig = new ResourceConfig(ResourceA.class, ResourceB.class, ModelProcessorFeature.class);
        resourceConfig.property(ServerProperties.WADL_FEATURE_DISABLE, true);
        return resourceConfig;
    }

    @Test
    public void testResourceAGet() {
View Full Code Here

                                                 Boolean monitoringStatisticsMBeansEnabled) {
        final ResourceConfig resourceConfig = new ResourceConfig(Resource.class);
        resourceConfig.property(ServerProperties.APPLICATION_NAME, "testApp");
        resourceConfig.property(FORCE_ENABLE, forceEnable);
        if (enableMonitoring) {
            resourceConfig.property(ENABLE_MONITORING, true);
        }
        if (enableMonitoringStatistics) {
            resourceConfig.property(ENABLE_MONITORING_STATISTICS, true);
        }
        if (enableMonitoringStatisticsMBeans) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.