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

  • Start an intent from android
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JFileChooser (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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