public class HttpManagerImpl extends HttpManager
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
HttpManagerImpl()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(org.apache.http.cookie.Cookie cookie)
Add a cookie to the HttpManager.
|
void |
addCookies(org.apache.http.cookie.Cookie[] cookies)
Add an array of cookies to the HttpManager.
|
void |
clearCookies()
Clear all cookies currently available in the HttpManager.
|
void |
clearData()
Called at the end of a request that the component was used in.
|
protected org.apache.http.conn.ClientConnectionManager |
createClientConnectionManager(javax.portlet.PortletRequest request,
org.apache.http.params.HttpParams params)
Creates a new ClientConnectionManager to be used by the
HttpClient. |
protected org.apache.http.impl.client.DefaultHttpClient |
createHttpClient(javax.portlet.PortletRequest request)
Create a new THREAD SAFE HttpClient instance using the available portlet preferences.
|
Request |
createRequest()
Creates an empty request object.
|
Response |
doRequest(Request request)
Performs the request with the given request object.
|
List<org.apache.http.cookie.Cookie> |
getCookies()
Return a list of all currently set cookies in the HttpManager.
|
org.apache.http.auth.Credentials |
getCredentials()
Return the user authentication credentials.
|
protected org.apache.http.impl.client.DefaultHttpClient |
getHttpClient(javax.portlet.PortletRequest request) |
String |
getName()
Returns a displayable name for the component.
|
void |
setClientConnectionManager(org.apache.http.conn.ClientConnectionManager clientConnectionManager)
(Optional) The ClientConnectionManager to use for creating the
HttpClient instance. |
void |
setCredentials(org.apache.http.auth.Credentials credentials)
Set the user authentication credentials.
|
protected org.apache.http.impl.client.DefaultHttpClient |
setHttpClientTimeouts(javax.portlet.PortletRequest request,
org.apache.http.impl.client.DefaultHttpClient client) |
void |
setSchemeRegistry(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry)
The
SchemeRegistry to use for the connections, required |
void |
setup(javax.portlet.PortletRequest request)
Responsible for setting up the HttpManager.
|
getCookieLock, setActionData, setRenderDatapublic void setSchemeRegistry(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry)
SchemeRegistry to use for the connections, requiredpublic void setClientConnectionManager(org.apache.http.conn.ClientConnectionManager clientConnectionManager)
HttpClient instance. If not specified one will be created for each HttpClient created.public Response doRequest(Request request) throws HttpTimeoutException, IOException
HttpManagerdoRequest in class HttpManagerrequest - the (@link Request) object that contains all the necessary data to make the remote request.HttpTimeoutExceptionIOExceptionpublic Request createRequest()
HttpManagercreateRequest in class HttpManagerpublic String getName()
ProxyComponentpublic void clearData()
ProxyComponentpublic void setup(javax.portlet.PortletRequest request)
HttpManagersetup in class HttpManagerprotected org.apache.http.impl.client.DefaultHttpClient setHttpClientTimeouts(javax.portlet.PortletRequest request,
org.apache.http.impl.client.DefaultHttpClient client)
public void addCookie(org.apache.http.cookie.Cookie cookie)
HttpManageraddCookie in class HttpManagerpublic void addCookies(org.apache.http.cookie.Cookie[] cookies)
HttpManageraddCookies in class HttpManagerpublic void clearCookies()
HttpManagerclearCookies in class HttpManagerpublic List<org.apache.http.cookie.Cookie> getCookies()
HttpManagergetCookies in class HttpManagerpublic org.apache.http.auth.Credentials getCredentials()
HttpManagergetCredentials in class HttpManagerpublic void setCredentials(org.apache.http.auth.Credentials credentials)
HttpManagersetCredentials in class HttpManagerprotected final org.apache.http.impl.client.DefaultHttpClient getHttpClient(javax.portlet.PortletRequest request)
protected org.apache.http.impl.client.DefaultHttpClient createHttpClient(javax.portlet.PortletRequest request)
prefs - protected org.apache.http.conn.ClientConnectionManager createClientConnectionManager(javax.portlet.PortletRequest request,
org.apache.http.params.HttpParams params)
HttpClient. Configures the SchemeRegistry
as well as setting up connection related HttpParamsCopyright © 2016 Jasig. All Rights Reserved.