Tabnine Logo
IdleConnectionTimeoutThread.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.commons.httpclient.util.IdleConnectionTimeoutThread
constructor

Best Java code snippets using org.apache.commons.httpclient.util.IdleConnectionTimeoutThread.<init> (Showing top 5 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

idleConnectionTimeoutThread = new IdleConnectionTimeoutThread();
idleConnectionTimeoutThread.setName("Http_Idle_Connection_Timeout_Thread");
long idleConnectionTimeout = Long.parseLong(
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

idleConnectionTimeoutThread = new IdleConnectionTimeoutThread();
idleConnectionTimeoutThread.setConnectionTimeout(config.getReadTimeout());
idleConnectionTimeoutThread.addConnectionManager(connectionManager);
origin: org.mule.transports/mule-transport-http

if (!disableCleanupThread)
  connectionCleaner = new IdleConnectionTimeoutThread();
  connectionCleaner.setName("HttpClient-connection-cleaner-" + getName());
  connectionCleaner.addConnectionManager(clientConnectionManager);
org.apache.commons.httpclient.utilIdleConnectionTimeoutThread<init>

Popular methods of IdleConnectionTimeoutThread

  • 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
  • setConnectionTimeout
    Sets the timeout value to use when testing for idle connections.
  • 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

  • Running tasks concurrently on multiple threads
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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