Package org.glassfish.jersey.server

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


        if (registerFeature) {
            resourceConfig.register(ValidationFeature.class);
        }
        if (disableAutoDiscovery != null) {
            resourceConfig.property(ServerProperties.FEATURE_AUTO_DISCOVERY_DISABLE, disableAutoDiscovery);
        }
        if (disableValidation != null) {
            resourceConfig.property(ServerProperties.BV_FEATURE_DISABLE, disableValidation);
        }
        return resourceConfig;
View Full Code Here


        }
        if (disableAutoDiscovery != null) {
            resourceConfig.property(ServerProperties.FEATURE_AUTO_DISCOVERY_DISABLE, disableAutoDiscovery);
        }
        if (disableValidation != null) {
            resourceConfig.property(ServerProperties.BV_FEATURE_DISABLE, disableValidation);
        }
        return resourceConfig;
    }

    private void assertApply(int responseStatus, ResourceConfig resourceConfig, URI uri) throws InterruptedException, ExecutionException {
View Full Code Here

public class NoMessageBodyWorkerTest extends AbstractTypeTester {

    @Override
    protected Application configure() {
        final ResourceConfig resourceConfig = (ResourceConfig) super.configure();
        resourceConfig.property(CommonProperties.MOXY_JSON_FEATURE_DISABLE, true);
        return resourceConfig;
    }

    @Path("nobodyreader")
    public static class NoMessageBodyReaderResource {
View Full Code Here

        Map<String, String> languages = Maps.newHashMap();
        languages.put("english", "en");
        languages.put("french", "fr");

        ResourceConfig rc = new ResourceConfig(LanguageVariantResource.class);
        rc.property(ServerProperties.LANGUAGE_MAPPINGS, languages);
        return rc;
    }

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

public class UriConnegMappingFromStringTest extends UriConnegLanguageMediaTypeTest {

    @Override
    protected Application configure() {
        ResourceConfig rc = new ResourceConfig(LanguageVariantResource.class);
        rc.property(ServerProperties.LANGUAGE_MAPPINGS,  "english : en, french : fr");
        rc.property(ServerProperties.MEDIA_TYPE_MAPPINGS, "foo : application/foo, bar : application/bar");
        return rc;
    }
}
View Full Code Here

    @Override
    protected Application configure() {
        ResourceConfig rc = new ResourceConfig(LanguageVariantResource.class);
        rc.property(ServerProperties.LANGUAGE_MAPPINGS,  "english : en, french : fr");
        rc.property(ServerProperties.MEDIA_TYPE_MAPPINGS, "foo : application/foo, bar : application/bar");
        return rc;
    }
}
View Full Code Here

                classes.add(c);
            }
        }

        ResourceConfig rc = new ResourceConfig(classes);
        rc.property(ServerProperties.MEDIA_TYPE_MAPPINGS, mediaTypes);
        return rc;
    }

    public static abstract class Base {
        @GET
View Full Code Here

        Map<String, String> languages = Maps.newHashMap();
        languages.put("english", "en");
        languages.put("french", "fr");

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

        languages.put("english", "en");
        languages.put("french", "fr");

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

        final ResourceConfig resourceConfig = new ResourceConfig(CustomConfigResource.class);

        resourceConfig.register(MoxyXmlFeature.class);
        resourceConfig.register(ValidationConfigurationContextResolver.class);

        resourceConfig.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);

        return resourceConfig;
    }

    @Override
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.