Tabnine Logo
HttpClientOptions.setSocketTimeout
Code IndexAdd Tabnine to your IDE (free)

How to use
setSocketTimeout
method
in
com.atlassian.httpclient.api.factory.HttpClientOptions

Best Java code snippets using com.atlassian.httpclient.api.factory.HttpClientOptions.setSocketTimeout (Showing top 5 results out of 315)

origin: jenkinsci/jira-plugin

final HttpClientOptions options = new HttpClientOptions();
options.setRequestTimeout(readTimeout, TimeUnit.SECONDS);
options.setSocketTimeout(timeout, TimeUnit.SECONDS);
origin: com.atlassian.plugins/atlassian-connect-core

  private HttpClientOptions getHttpClientOptions() {
    HttpClientOptions options = new HttpClientOptions();
    options.setThreadPrefix("atlassian-connect");
    options.setMaxConnectionsPerHost(100);
    options.setUserAgent("Atlassian-Connect/"
        + pluginRetrievalService.getPlugin().getPluginInformation().getVersion());

    options.setConnectionTimeout(3, TimeUnit.SECONDS);
    options.setSocketTimeout(5, TimeUnit.SECONDS);
    options.setRequestTimeout(10, TimeUnit.SECONDS);
    options.setLeaseTimeout(TimeUnit.SECONDS.toMillis(3));
    return options;
  }
}
origin: com.atlassian.jira/jira-ondemand-acceptance-tests

public static DefaultHttpClient<Void> createDefaultHttpClient(final String baseUrl)
{
  final HttpClientOptions opts = new HttpClientOptions();
  final int timeout = 120;
  opts.setSocketTimeout(timeout, TimeUnit.SECONDS);
  opts.setConnectionTimeout(timeout, TimeUnit.SECONDS);
  opts.setRequestTimeout(timeout, TimeUnit.SECONDS);
  return new DefaultHttpClient<Void>(new VoidEventPublisher(), new ApplicationPropertiesImpl(baseUrl),
      ThreadLocalContextManagers.<Void> noop(), opts);
}
origin: com.atlassian.plugins/atlassian-connect-server-core

  private HttpClientOptions getHttpClientOptions() {
    HttpClientOptions options = new HttpClientOptions();

    options.setThreadPrefix("atlassian-connect");
    options.setMaxConnectionsPerHost(productAccessor.getMaxHttpConnectionsPerHost());
    options.setUserAgent("Atlassian-Connect/"
        + pluginRetrievalService.getPlugin().getPluginInformation().getVersion());

    options.setConnectionTimeout(productAccessor.getHttpConnectionTimeoutSeconds(), TimeUnit.SECONDS);
    options.setSocketTimeout(productAccessor.getHttpSocketTimeoutSeconds(), TimeUnit.SECONDS);
    options.setRequestTimeout(productAccessor.getHttpRequestTimeoutSeconds(), TimeUnit.SECONDS);
    options.setLeaseTimeout(TimeUnit.SECONDS.toMillis(productAccessor.getPluginHttpLeaseTimeoutSeconds()));
    return options;
  }
}
origin: com.atlassian.webhooks/atlassian-webhooks-plugin

@Override
public void onStart(WebhooksConfiguration configuration) {
  this.configuration = configuration;
  HttpClientOptions options = new HttpClientOptions();
  options.setMaxCacheEntries(0);
  options.setIgnoreCookies(true);
  options.setMaxCallbackThreadPoolSize(configuration.getMaxCallbackThreads());
  options.setMaxConnectionsPerHost(configuration.getMaxHttpConnectionsPerHost());
  options.setMaxEntitySize(configuration.getMaxResponseBodySize());
  options.setConnectionPoolTimeToLive(1, TimeUnit.MINUTES);
  options.setMaxTotalConnections(configuration.getMaxHttpConnections());
  options.setConnectionTimeout(toSeconds(configuration.getConnectionTimeout()), TimeUnit.SECONDS);
  options.setSocketTimeout(toSeconds(configuration.getSocketTimeout()), TimeUnit.SECONDS);
  options.setIoThreadCount(configuration.getIoThreadCount());
  options.setBlacklistedAddresses(configuration.getBlacklistedAddresses());
  client = httpClientFactory.create(options);
}
com.atlassian.httpclient.api.factoryHttpClientOptionssetSocketTimeout

Popular methods of HttpClientOptions

  • <init>
  • getThreadPrefix
  • setConnectionTimeout
    Sets how long, in milliseconds, to wait for a TCP connection
  • setRequestTimeout
  • getCallbackExecutor
  • getConnectionPoolTimeToLive
  • getConnectionTimeout
  • getIoSelectInterval
    Determines time interval in milliseconds at which the I/O reactor wakes up to check for timed out se
  • getIoThreadCount
    Determines the number of I/O dispatch threads to be used by the I/O reactor. Default: 10
  • getLeaseTimeout
  • getMaxConnectionsPerHost
  • getMaxEntitySize
  • getMaxConnectionsPerHost,
  • getMaxEntitySize,
  • getRequestPreparer,
  • getSocketTimeout,
  • getUserAgent,
  • setMaxConnectionsPerHost,
  • setThreadPrefix,
  • getIgnoreCookies,
  • getMaxCacheEntries

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ImageIO (javax.imageio)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text plugins
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