Package io.dropwizard.jersey.jackson

Examples of io.dropwizard.jersey.jackson.JacksonMessageBodyProvider


        if (gzip.isEnabled()) {
            final FilterHolder holder = new FilterHolder(gzip.build());
            handler.addFilter(holder, "/*", EnumSet.allOf(DispatcherType.class));
        }
        if (jerseyContainer != null) {
            jersey.register(new JacksonMessageBodyProvider(objectMapper, validator));
            handler.addServlet(new NonblockingServletHolder(jerseyContainer), jersey.getUrlPattern());
        }
        final InstrumentedHandler instrumented = new InstrumentedHandler(metricRegistry);
        instrumented.setServer(server);
        instrumented.setHandler(handler);
View Full Code Here


                                                               MetricRegistry metrics) {
        HttpClient httpClient = new HttpClientBuilder(metrics).using(configuration).build("dictionary");
        ApacheHttpClient4Handler handler = new ApacheHttpClient4Handler(httpClient, null, true);
        ApacheHttpClient4Config config = new DefaultApacheHttpClient4Config();
        Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
        config.getSingletons().add(new JacksonMessageBodyProvider(Jackson.newObjectMapper(), validator));
        return new ApacheHttpClient4(handler, config);
    }
View Full Code Here

                                config.register(provider);
                            }
                            for (Map.Entry<String, Object> property : properties.entrySet()) {
                                config.property(property.getKey(), property.getValue());
                            }
                            config.register(new JacksonMessageBodyProvider(mapper, validator));
                            for (Object singleton : singletons)
                                config.register(singleton);
                            return config;
                        }
                    };
View Full Code Here

        }

        final DropwizardResourceConfig config = DropwizardResourceConfig.forTesting(new MetricRegistry());
        config.register(new UnitOfWorkApplicationListener(sessionFactory));
        config.register(new PersonResource(new PersonDAO(sessionFactory)));
        config.register(new JacksonMessageBodyProvider(Jackson.newObjectMapper(),
                                                       Validation.buildDefaultValidatorFactory().getValidator()));
        return config;
    }
View Full Code Here

        return config;
    }

    @Override
    protected void configureClient(ClientConfig config) {
        config.register(new JacksonMessageBodyProvider(Jackson.newObjectMapper(),
                Validation.buildDefaultValidatorFactory().getValidator()));
    }
View Full Code Here

            final FilterHolder holder = new FilterHolder(gzip.build());
            handler.addFilter(holder, "/*", EnumSet.allOf(DispatcherType.class));
        }
        if (jerseyContainer != null) {
            jersey.setUrlPattern(jerseyRootPath);
            jersey.register(new JacksonMessageBodyProvider(objectMapper, validator));
            handler.addServlet(new NonblockingServletHolder(jerseyContainer), jersey.getUrlPattern());
        }
        final InstrumentedHandler instrumented = new InstrumentedHandler(metricRegistry);
        instrumented.setServer(server);
        instrumented.setHandler(handler);
View Full Code Here

                                                               MetricRegistry metrics) {
        HttpClient httpClient = new HttpClientBuilder(metrics).using(configuration).build("calculator");
        ApacheHttpClient4Handler handler = new ApacheHttpClient4Handler(httpClient, null, true);
        ApacheHttpClient4Config config = new DefaultApacheHttpClient4Config();
        Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
        config.getSingletons().add(new JacksonMessageBodyProvider(Jackson.newObjectMapper(), validator));
        return new ApacheHttpClient4(handler, config);
    }
View Full Code Here

TOP

Related Classes of io.dropwizard.jersey.jackson.JacksonMessageBodyProvider

Copyright © 2018 www.massapicom. 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.