Tabnine Logo
HttpConfig.getObjectMapper
Code IndexAdd Tabnine 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)

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

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now