|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oaklandsw.http.HttpConnectionManager
Creates and manages a pool of HttpConnections.
Used only to get an HttpConnection to allow repeated use of a specific connection for a HttpURLConnection.
Field Summary | |
static int |
COUNT_ATTEMPTED
|
static int |
COUNT_AVOIDED_FLUSHES
|
static int |
COUNT_BUFFER_FLUSHES
|
static int |
COUNT_FAIL_GE_400
|
static int |
COUNT_FAIL_MAX_RETRY
|
static int |
COUNT_FLUSH_IO_ERRORS
|
static int |
COUNT_FORCED_FLUSHES
|
static int |
COUNT_LAST
|
static int |
COUNT_PIPELINE_DEPTH_HIGH
|
static int |
COUNT_PIPELINE_ERROR
|
static int |
COUNT_PIPELINE_READ_RESP
|
static int |
COUNT_PIPELINE_WRITE_REQ
|
static int |
COUNT_SUCCESS
|
static int |
COUNT_TOTAL_PIPELINE_RETRY
|
static int |
COUNT_TOTAL_RETRY
|
Constructor Summary | |
HttpConnectionManager(GlobalState globalState)
|
Method Summary | |
boolean |
checkEverythingEmpty()
|
int |
getActiveConnectionCount(java.lang.String url)
Returns the number of connections currently in use for the specified host/port. |
Credential |
getCachedCredential(ConnectionInfo ci,
int authType)
|
HttpConnection |
getConnection(HttpURLConnection urlCon)
Get an HttpConnection for a given URL. |
int |
getCount(int count)
|
GlobalState |
getGlobalState()
|
int |
getTotalConnectionCount(java.lang.String url)
Returns the number of connections currently in use for the specified host/port. |
void |
releaseConnection(HttpConnection conn)
Make the given HttpConnection available for use by other requests. |
void |
resetStatistics()
|
void |
setSocketConnectionIOListener(ConnectionIOListener ioListener)
Sets a ConnectionIOListener to receive events associated with data on the all connections. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int COUNT_ATTEMPTED
public static final int COUNT_SUCCESS
public static final int COUNT_PIPELINE_WRITE_REQ
public static final int COUNT_PIPELINE_READ_RESP
public static final int COUNT_PIPELINE_ERROR
public static final int COUNT_TOTAL_RETRY
public static final int COUNT_TOTAL_PIPELINE_RETRY
public static final int COUNT_FAIL_MAX_RETRY
public static final int COUNT_FAIL_GE_400
public static final int COUNT_PIPELINE_DEPTH_HIGH
public static final int COUNT_FORCED_FLUSHES
public static final int COUNT_BUFFER_FLUSHES
public static final int COUNT_AVOIDED_FLUSHES
public static final int COUNT_FLUSH_IO_ERRORS
public static final int COUNT_LAST
Constructor Detail |
public HttpConnectionManager(GlobalState globalState)
Method Detail |
public void setSocketConnectionIOListener(ConnectionIOListener ioListener)
ioListener
- public HttpConnection getConnection(HttpURLConnection urlCon) throws HttpException, java.lang.InterruptedException, java.net.MalformedURLException
connectionTimeout
milliseconds or until a
connection becomes available. If no connection becomes available before
the timeout expires an HttpException will be thrown.
urlCon
- -
an HttpURLConnection
java.net.MalformedURLException
HttpException
- -
If no connection becomes available before the timeout
expires
java.lang.InterruptedException
public void releaseConnection(HttpConnection conn) throws java.lang.InterruptedException
conn
- -
The HttpConnection to make available.
java.lang.InterruptedException
public int getActiveConnectionCount(java.lang.String url)
public int getTotalConnectionCount(java.lang.String url)
public boolean checkEverythingEmpty()
public Credential getCachedCredential(ConnectionInfo ci, int authType)
public void resetStatistics()
public int getCount(int count)
public GlobalState getGlobalState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |