|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.io.ConnectionHandler
public class ConnectionHandler
A class to handle the connections to the net. Tries to reuse connections whenever possible.
Constructor Summary | |
---|---|
ConnectionHandler(Counter counter,
Resolver resolver,
NioHandler nioHandler)
|
Method Summary | |
---|---|
Map<Address,List<WebConnection>> |
getActiveConnections()
|
void |
getConnection(HttpHeader header,
WebConnectionListener wcl)
Get a WebConnection for the given header. |
long |
getKeepaliveTime()
Get the current keep alive time. |
void |
markForPipelining(WebConnection wc)
Mark a WebConnection ready for pipelining. |
void |
releaseConnection(WebConnection wc)
Return a WebConnection to the pool so that it may be reused. |
void |
setKeepaliveTime(long milis)
Set the keep alive time for this handler. |
void |
setup(SProperties config)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionHandler(Counter counter, Resolver resolver, NioHandler nioHandler)
Method Detail |
---|
public void setKeepaliveTime(long milis)
milis
- the keep alive time in miliseconds.public long getKeepaliveTime()
public Map<Address,List<WebConnection>> getActiveConnections()
public void getConnection(HttpHeader header, WebConnectionListener wcl)
header
- the HttpHeader containing the URL to connect to.wcl
- the Listener that wants the connection.public void releaseConnection(WebConnection wc)
wc
- the WebConnection to return.public void markForPipelining(WebConnection wc)
wc
- the WebConnection to mark ready for pipelining.public void setup(SProperties config)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |