Package org.alfresco.httpclient
Class AbstractHttpClient
- java.lang.Object
-
- org.alfresco.httpclient.AbstractHttpClient
-
- All Implemented Interfaces:
AlfrescoHttpClient
public abstract class AbstractHttpClient extends java.lang.Object implements AlfrescoHttpClient
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALFRESCO_DEFAULT_BASE_URL
static int
DEFAULT_SAVEPOST_BUFFER
protected org.apache.commons.httpclient.HttpClient
httpClient
-
Constructor Summary
Constructors Constructor Description AbstractHttpClient(org.apache.commons.httpclient.HttpClient httpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected org.apache.commons.httpclient.HttpMethod
createMethod(Request req)
protected long
executeMethod(org.apache.commons.httpclient.HttpMethod method)
java.lang.String
getBaseUrl()
protected org.apache.commons.httpclient.HttpClient
getHttpClient()
protected org.apache.commons.httpclient.HttpMethod
sendRemoteRequest(Request req)
Send Request to the repositoryvoid
setBaseUrl(java.lang.String baseUrl)
Set the base url to alfresco - normally /alfresco-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.httpclient.AlfrescoHttpClient
sendRequest
-
-
-
-
Field Detail
-
ALFRESCO_DEFAULT_BASE_URL
public static final java.lang.String ALFRESCO_DEFAULT_BASE_URL
- See Also:
- Constant Field Values
-
DEFAULT_SAVEPOST_BUFFER
public static final int DEFAULT_SAVEPOST_BUFFER
- See Also:
- Constant Field Values
-
httpClient
protected org.apache.commons.httpclient.HttpClient httpClient
-
-
Method Detail
-
getHttpClient
protected org.apache.commons.httpclient.HttpClient getHttpClient()
-
getBaseUrl
public java.lang.String getBaseUrl()
- Returns:
- the baseUrl
-
setBaseUrl
public void setBaseUrl(java.lang.String baseUrl)
Description copied from interface:AlfrescoHttpClient
Set the base url to alfresco - normally /alfresco- Specified by:
setBaseUrl
in interfaceAlfrescoHttpClient
- Parameters:
baseUrl
- the baseUrl to set
-
sendRemoteRequest
protected org.apache.commons.httpclient.HttpMethod sendRemoteRequest(Request req) throws AuthenticationException, java.io.IOException
Send Request to the repository- Throws:
AuthenticationException
java.io.IOException
-
executeMethod
protected long executeMethod(org.apache.commons.httpclient.HttpMethod method) throws org.apache.commons.httpclient.HttpException, java.io.IOException
- Throws:
org.apache.commons.httpclient.HttpException
java.io.IOException
-
createMethod
protected org.apache.commons.httpclient.HttpMethod createMethod(Request req) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfaceAlfrescoHttpClient
-
-