public class

GrizzlyConnectionsPool

extends Object
implements ConnectionsPool<U, V>
java.lang.Object
   ↳ com.ning.http.client.providers.grizzly.GrizzlyConnectionsPool

Class Overview

ConnectionsPool implementation.

Summary

Public Constructors
GrizzlyConnectionsPool(AsyncHttpClientConfig config)
Public Methods
boolean canCacheConnection()
Return true if a connection can be cached.
void destroy()
Destroy all connections that has been cached by this instance.
boolean offer(String uri, Connection connection)
Connection poll(String uri)
boolean removeAll(Connection connection)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.ConnectionsPool

Public Constructors

public GrizzlyConnectionsPool (AsyncHttpClientConfig config)

Public Methods

public boolean canCacheConnection ()

Return true if a connection can be cached. A implementation can decide based on some rules to allow caching Calling this method is equivalent of checking the returned value of offer(Object, Object)

Returns
  • true if a connection can be cached.

public void destroy ()

Destroy all connections that has been cached by this instance.

public boolean offer (String uri, Connection connection)

public Connection poll (String uri)

public boolean removeAll (Connection connection)