| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.5.0_22) on Sun Oct 21 11:03:14 GMT+01:00 2012 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| ClientConnectionManager (HttpComponents Client 4.2.2 API) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="org.apache.http.conn.ClientConnectionManager interface"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="ClientConnectionManager (HttpComponents Client 4.2.2 API)"; |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ClientConnectionManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/http/conn/BasicManagedEntity.html" title="class in org.apache.http.conn"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/http/conn/ClientConnectionManagerFactory.html" title="interface in org.apache.http.conn"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/http/conn/ClientConnectionManager.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="ClientConnectionManager.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.http.conn</FONT> |
| <BR> |
| Interface ClientConnectionManager</H2> |
| <DL> |
| <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/http/impl/conn/BasicClientConnectionManager.html" title="class in org.apache.http.impl.conn">BasicClientConnectionManager</A>, <A HREF="../../../../org/apache/http/impl/conn/PoolingClientConnectionManager.html" title="class in org.apache.http.impl.conn">PoolingClientConnectionManager</A>, <A HREF="../../../../org/apache/http/impl/conn/SingleClientConnManager.html" title="class in org.apache.http.impl.conn">SingleClientConnManager</A>, <A HREF="../../../../org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.html" title="class in org.apache.http.impl.conn.tsccm">ThreadSafeClientConnManager</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE>public interface <B>ClientConnectionManager</B></DL> |
| </PRE> |
| |
| <P> |
| Management interface for <A HREF="../../../../org/apache/http/conn/ManagedClientConnection.html" title="interface in org.apache.http.conn"><CODE>client connections</CODE></A>. |
| The purpose of an HTTP connection manager is to serve as a factory for new |
| HTTP connections, manage persistent connections and synchronize access to |
| persistent connections making sure that only one thread of execution can |
| have access to a connection at a time. |
| <p> |
| Implementations of this interface must be thread-safe. Access to shared |
| data must be synchronized as methods of this interface may be executed |
| from multiple threads. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>4.0</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#closeExpiredConnections()">closeExpiredConnections</A></B>()</CODE> |
| |
| <BR> |
| Closes all expired connections in the pool.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#closeIdleConnections(long, java.util.concurrent.TimeUnit)">closeIdleConnections</A></B>(long idletime, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent">TimeUnit</A> tunit)</CODE> |
| |
| <BR> |
| Closes idle connections in the pool.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/http/conn/scheme/SchemeRegistry.html" title="class in org.apache.http.conn.scheme">SchemeRegistry</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#getSchemeRegistry()">getSchemeRegistry</A></B>()</CODE> |
| |
| <BR> |
| Obtains the scheme registry used by this manager.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit)">releaseConnection</A></B>(<A HREF="../../../../org/apache/http/conn/ManagedClientConnection.html" title="interface in org.apache.http.conn">ManagedClientConnection</A> conn, |
| long validDuration, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent">TimeUnit</A> timeUnit)</CODE> |
| |
| <BR> |
| Releases a connection for use by others.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../../org/apache/http/conn/ClientConnectionRequest.html" title="interface in org.apache.http.conn">ClientConnectionRequest</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object)">requestConnection</A></B>(<A HREF="../../../../org/apache/http/conn/routing/HttpRoute.html" title="class in org.apache.http.conn.routing">HttpRoute</A> route, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> state)</CODE> |
| |
| <BR> |
| Returns a new <A HREF="../../../../org/apache/http/conn/ClientConnectionRequest.html" title="interface in org.apache.http.conn"><CODE>ClientConnectionRequest</CODE></A>, from which a |
| <A HREF="../../../../org/apache/http/conn/ManagedClientConnection.html" title="interface in org.apache.http.conn"><CODE>ManagedClientConnection</CODE></A> can be obtained or the request can be |
| aborted.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#shutdown()">shutdown</A></B>()</CODE> |
| |
| <BR> |
| Shuts down this connection manager and releases allocated resources.</TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="getSchemeRegistry()"><!-- --></A><H3> |
| getSchemeRegistry</H3> |
| <PRE> |
| <A HREF="../../../../org/apache/http/conn/scheme/SchemeRegistry.html" title="class in org.apache.http.conn.scheme">SchemeRegistry</A> <B>getSchemeRegistry</B>()</PRE> |
| <DL> |
| <DD>Obtains the scheme registry used by this manager. |
| <P> |
| <DD><DL> |
| |
| <DT><B>Returns:</B><DD>the scheme registry, never <code>null</code></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="requestConnection(org.apache.http.conn.routing.HttpRoute, java.lang.Object)"><!-- --></A><H3> |
| requestConnection</H3> |
| <PRE> |
| <A HREF="../../../../org/apache/http/conn/ClientConnectionRequest.html" title="interface in org.apache.http.conn">ClientConnectionRequest</A> <B>requestConnection</B>(<A HREF="../../../../org/apache/http/conn/routing/HttpRoute.html" title="class in org.apache.http.conn.routing">HttpRoute</A> route, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> state)</PRE> |
| <DL> |
| <DD>Returns a new <A HREF="../../../../org/apache/http/conn/ClientConnectionRequest.html" title="interface in org.apache.http.conn"><CODE>ClientConnectionRequest</CODE></A>, from which a |
| <A HREF="../../../../org/apache/http/conn/ManagedClientConnection.html" title="interface in org.apache.http.conn"><CODE>ManagedClientConnection</CODE></A> can be obtained or the request can be |
| aborted. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="releaseConnection(org.apache.http.conn.ManagedClientConnection, long, java.util.concurrent.TimeUnit)"><!-- --></A><H3> |
| releaseConnection</H3> |
| <PRE> |
| void <B>releaseConnection</B>(<A HREF="../../../../org/apache/http/conn/ManagedClientConnection.html" title="interface in org.apache.http.conn">ManagedClientConnection</A> conn, |
| long validDuration, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent">TimeUnit</A> timeUnit)</PRE> |
| <DL> |
| <DD>Releases a connection for use by others. |
| You may optionally specify how long the connection is valid |
| to be reused. Values <= 0 are considered to be valid forever. |
| If the connection is not marked as reusable, the connection will |
| not be reused regardless of the valid duration. |
| |
| If the connection has been released before, |
| the call will be ignored. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>conn</CODE> - the connection to release<DD><CODE>validDuration</CODE> - the duration of time this connection is valid for reuse<DD><CODE>timeUnit</CODE> - the unit of time validDuration is measured in<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#closeExpiredConnections()"><CODE>closeExpiredConnections()</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="closeIdleConnections(long, java.util.concurrent.TimeUnit)"><!-- --></A><H3> |
| closeIdleConnections</H3> |
| <PRE> |
| void <B>closeIdleConnections</B>(long idletime, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent">TimeUnit</A> tunit)</PRE> |
| <DL> |
| <DD>Closes idle connections in the pool. |
| Open connections in the pool that have not been used for the |
| timespan given by the argument will be closed. |
| Currently allocated connections are not subject to this method. |
| Times will be checked with milliseconds precision |
| |
| All expired connections will also be closed. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>idletime</CODE> - the idle time of connections to be closed<DD><CODE>tunit</CODE> - the unit for the <code>idletime</code><DT><B>See Also:</B><DD><A HREF="../../../../org/apache/http/conn/ClientConnectionManager.html#closeExpiredConnections()"><CODE>closeExpiredConnections()</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="closeExpiredConnections()"><!-- --></A><H3> |
| closeExpiredConnections</H3> |
| <PRE> |
| void <B>closeExpiredConnections</B>()</PRE> |
| <DL> |
| <DD>Closes all expired connections in the pool. |
| Open connections in the pool that have not been used for |
| the timespan defined when the connection was released will be closed. |
| Currently allocated connections are not subject to this method. |
| Times will be checked with milliseconds precision. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="shutdown()"><!-- --></A><H3> |
| shutdown</H3> |
| <PRE> |
| void <B>shutdown</B>()</PRE> |
| <DL> |
| <DD>Shuts down this connection manager and releases allocated resources. |
| This includes closing all connections, whether they are currently |
| used or not. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ClientConnectionManager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/http/conn/BasicManagedEntity.html" title="class in org.apache.http.conn"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/http/conn/ClientConnectionManagerFactory.html" title="interface in org.apache.http.conn"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/http/conn/ClientConnectionManager.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="ClientConnectionManager.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 1999-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |