public class ConnectionsPool extends Object
Constructor and Description |
---|
ConnectionsPool(org.apache.http.impl.client.DefaultHttpClient client,
URL url,
Integer sessionTimeout,
long idleCheckTTL,
long closeCloseTTl) |
Modifier and Type | Method and Description |
---|---|
org.apache.http.HttpResponse |
execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.protocol.HttpContext context)
Executes HTTP request
|
org.apache.http.conn.ClientConnectionManager |
getConnectionManager() |
List<org.apache.http.cookie.Cookie> |
getCookies() |
org.apache.http.client.CookieStore |
getCookieStore() |
Integer |
getSessionTimeout() |
URL |
getUrl() |
void |
shutdown()
When ConnectionsPool instance is no longer needed, shut down
the connection manager and idle connections watchdog
to ensure immediate deallocation of all system resources.
|
public ConnectionsPool(org.apache.http.impl.client.DefaultHttpClient client, URL url, Integer sessionTimeout, long idleCheckTTL, long closeCloseTTl)
client
- DefaultHttpClienturl
- oVirt API urlsessionTimeout
- authentication session inactivity timeoutidleCheckTTL
- idle connections check TTLcloseCloseTTl
- idle connections close TTLpublic org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.protocol.HttpContext context) throws IOException, org.apache.http.client.ClientProtocolException
request
- HttpUriRequestcontext
- HttpContextHttpResponse
IOException
org.apache.http.client.ClientProtocolException
public List<org.apache.http.cookie.Cookie> getCookies()
Cookie
public org.apache.http.client.CookieStore getCookieStore()
CookieStore
public org.apache.http.conn.ClientConnectionManager getConnectionManager()
ConnectionManager
public URL getUrl()
public Integer getSessionTimeout()
public void shutdown()
Copyright ? 2010 Red Hat, Inc - released under the Apache License Version 2.0