use of com.hubspot.horizon.HttpConfig in project Singularity by HubSpot.
the class SingularityMesosClientModule method configure.
@Override
protected void configure() {
ObjectMapper objectMapper = JavaUtils.newObjectMapper();
HttpConfig httpConfig = HttpConfig.newBuilder().setObjectMapper(objectMapper).build();
HttpClient httpClient = new NingHttpClient(httpConfig);
bind(ObjectMapper.class).annotatedWith(Names.named(MESOS_CLIENT_OBJECT_MAPPER)).toInstance(objectMapper);
bind(HttpClient.class).annotatedWith(Names.named(SingularityMesosClient.HTTP_CLIENT_NAME)).toInstance(httpClient);
bind(MesosClient.class).to(SingularityMesosClient.class).in(Scopes.SINGLETON);
}
Aggregations