Codota Logo
HttpConfig.getObjectMapper
Code IndexAdd Codota to your IDE (free)

How to use
getObjectMapper
method
in
com.hubspot.horizon.HttpConfig

Best Java code snippets using com.hubspot.horizon.HttpConfig.getObjectMapper (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: com.hubspot/HorizonApache

try {
 apacheResponse = apacheClient.execute(apacheRequest);
 response = CachedHttpResponse.from(new ApacheHttpResponse(request, apacheResponse, config.getObjectMapper()));
} finally {
origin: com.hubspot/HorizonApache

public ApacheHttpClient(HttpConfig config) {
 Preconditions.checkNotNull(config);
 HttpClientBuilder builder = HttpClientBuilder.create();
 builder.setConnectionManager(createConnectionManager(config));
 builder.setRedirectStrategy(new LenientRedirectStrategy());
 builder.setKeepAliveStrategy(new KeepAliveWithDefaultStrategy(config.getDefaultKeepAliveMillis()));
 builder.addInterceptorFirst(new DefaultHeadersRequestInterceptor(config));
 builder.addInterceptorFirst(new SnappyContentEncodingResponseInterceptor());
 builder.setDefaultRequestConfig(createRequestConfig(config));
 builder.setDefaultSocketConfig(createSocketConfig(config));
 builder.disableContentCompression();
 this.apacheClient = builder.build();
 this.requestConverter = new ApacheHttpRequestConverter(config.getObjectMapper());
 this.config = config;
 this.defaultOptions = config.getOptions();
 this.timer = new Timer("http-request-timeout", true);
}
origin: com.hubspot/HorizonNing

public NingAsyncHttpClient(HttpConfig config) {
 Preconditions.checkNotNull(config);
 NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig();
 int workerThreads = Math.min(Runtime.getRuntime().availableProcessors(), 4);
 this.workerExecutorService = newWorkerThreadPool(workerThreads);
 this.channelFactory = newSocketChannelFactory(this.workerExecutorService, workerThreads);
 nettyConfig.setSocketChannelFactory(this.channelFactory);
 nettyConfig.setNettyTimer(TIMER);
 AsyncHttpClientConfig ningConfig = new AsyncHttpClientConfig.Builder()
     .addRequestFilter(new ThrottleRequestFilter(config.getMaxConnections()))
     .addRequestFilter(new AcceptEncodingRequestFilter())
     .setMaxConnectionsPerHost(config.getMaxConnectionsPerHost())
     .setConnectTimeout(config.getConnectTimeoutMillis())
     .setRequestTimeout(config.getRequestTimeoutMillis())
     .setReadTimeout(config.getRequestTimeoutMillis())
     .setMaxRedirects(config.getMaxRedirects())
     .setFollowRedirect(config.isFollowRedirects())
     .setHostnameVerifier(new NingHostnameVerifier(config.getSSLConfig()))
     .setSSLContext(NingSSLContext.forConfig(config.getSSLConfig()))
     .setAsyncHttpClientProviderConfig(nettyConfig)
     .setUserAgent(config.getUserAgent())
     .setIOThreadMultiplier(1)
     .build();
 this.ningClient = new com.ning.http.client.AsyncHttpClient(ningConfig);
 this.requestConverter = new NingHttpRequestConverter(config.getObjectMapper());
 this.defaultOptions = config.getOptions();
 this.mapper = config.getObjectMapper();
}
com.hubspot.horizonHttpConfiggetObjectMapper

Popular methods of HttpConfig

  • newBuilder
  • getConnectTimeoutMillis
  • getMaxConnections
  • getMaxConnectionsPerHost
  • getMaxRedirects
  • getOptions
  • getRequestTimeoutMillis
  • getSSLConfig
  • getUserAgent
  • isFollowRedirects
  • <init>
  • getDefaultKeepAliveMillis
  • <init>,
  • getDefaultKeepAliveMillis,
  • isRejectRelativeRedirects

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now