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

How to use
setConnectionTimeout
method
in
org.apache.commons.httpclient.util.IdleConnectionTimeoutThread

Best Java code snippets using org.apache.commons.httpclient.util.IdleConnectionTimeoutThread.setConnectionTimeout (Showing top 4 results out of 315)

origin: mguessan/davmail

/**
 * Create and start a new HttpConnectionManager, close idle connections every minute.
 */
public static void start() {
  synchronized (LOCK) {
    if (httpConnectionManagerThread == null) {
      httpConnectionManagerThread = new IdleConnectionTimeoutThread();
      httpConnectionManagerThread.setName(IdleConnectionTimeoutThread.class.getSimpleName());
      httpConnectionManagerThread.setConnectionTimeout(ONE_MINUTE);
      httpConnectionManagerThread.setTimeoutInterval(ONE_MINUTE);
      httpConnectionManagerThread.start();
    }
  }
}
origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel

  log.debug("http.idle.connection.check.interval=" + idleConnectionCheckInterval);
idleConnectionTimeoutThread.setConnectionTimeout(idleConnectionTimeout);
idleConnectionTimeoutThread.setTimeoutInterval(idleConnectionCheckInterval);
origin: boyuanitsm/pay

/**
 * 私有的构造方法
 */
private HttpProtocolHandler() {
  // 创建一个线程安全的HTTP连接池
  connectionManager = new MultiThreadedHttpConnectionManager();
  connectionManager.getParams().setDefaultMaxConnectionsPerHost(defaultMaxConnPerHost);
  connectionManager.getParams().setMaxTotalConnections(defaultMaxTotalConn);
  IdleConnectionTimeoutThread ict = new IdleConnectionTimeoutThread();
  ict.addConnectionManager(connectionManager);
  ict.setConnectionTimeout(defaultIdleConnTimeout);
  ict.start();
}
origin: io.gatling/async-http-client

if (config.getReadTimeout() > 0 && requestTimeout != -1 && requestTimeout < config.getReadTimeout()) {
  idleConnectionTimeoutThread = new IdleConnectionTimeoutThread();
  idleConnectionTimeoutThread.setConnectionTimeout(config.getReadTimeout());
  idleConnectionTimeoutThread.addConnectionManager(connectionManager);
  idleConnectionTimeoutThread.start();
org.apache.commons.httpclient.utilIdleConnectionTimeoutThreadsetConnectionTimeout

Javadoc

Sets the timeout value to use when testing for idle connections.

Popular methods of IdleConnectionTimeoutThread

  • <init>
  • addConnectionManager
    Adds a connection manager to be handled by this class. HttpConnectionManager#closeIdleConnections(lo
  • handleCloseIdleConnections
    Handles calling HttpConnectionManager#closeIdleConnections(long)and doing any other cleanup work on
  • setDaemon
  • start
  • shutdown
    Stops the thread used to close idle connections. This class cannot be used once shutdown.
  • setName
  • setTimeoutInterval
    Sets the interval used by this class between closing idle connections. Idle connections will be clos
  • interrupt

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • CodeWhisperer alternatives
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