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

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

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

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.factoryHttpClientOptionssetConnectionTimeout

Javadoc

Sets how long, in milliseconds, to wait for a TCP connection

Popular methods of HttpClientOptions

  • <init>
  • setSocketTimeout
  • getThreadPrefix
  • 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

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • Menu (java.awt)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best plugins for Eclipse
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