|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.providers.netty.NettyConnectionsPool
public class NettyConnectionsPool
A simple implementation of ConnectionsPool based on a ConcurrentHashMap
| Constructor Summary | |
|---|---|
NettyConnectionsPool(AsyncHttpClientConfig config)
|
|
| Method Summary | |
|---|---|
boolean |
addConnection(String uri,
org.jboss.netty.channel.Channel connection)
Add a connection tpo the pool |
boolean |
canCacheConnection()
Return true if a connection can be cached. |
void |
destroy()
Destroy all connections that has been cached by this instance. |
org.jboss.netty.channel.Channel |
getConnection(String uri)
Return the connection associated with the uri |
boolean |
removeAllConnections(org.jboss.netty.channel.Channel connection)
Remove all connections from the cache. |
org.jboss.netty.channel.Channel |
removeConnection(String uri)
Remove the connection associated with the uri. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NettyConnectionsPool(AsyncHttpClientConfig config)
| Method Detail |
|---|
public boolean addConnection(String uri,
org.jboss.netty.channel.Channel connection)
addConnection in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>uri - a uri used to retrieve the cached connectionconnection - an I/O connection
public org.jboss.netty.channel.Channel getConnection(String uri)
getConnection in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>uri - the uri used when invoking addConnection
public org.jboss.netty.channel.Channel removeConnection(String uri)
removeConnection in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>uri - the uri used when invoking addConnection
public boolean removeAllConnections(org.jboss.netty.channel.Channel connection)
removeAllConnections in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>connection - a connection
public boolean canCacheConnection()
ConnectionsPool.addConnection(Object, Object)
canCacheConnection in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>public void destroy()
destroy in interface ConnectionsPool<String,org.jboss.netty.channel.Channel>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||