WebdavResource
public abstract class WebdavSession
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected org.apache.commons.httpclient.HttpClient |
client |
The Http client instance.
|
protected int |
debug |
Debug level.
|
protected org.apache.commons.httpclient.Credentials |
hostCredentials |
Credentials to use for authentication
|
protected org.apache.commons.httpclient.Credentials |
proxyCredentials |
Credentials to use for an authenticating proxy
|
protected java.lang.String |
proxyHost |
The hostname to use for the proxy, if any
|
protected int |
proxyPort |
Port number to use for proxy, if any
|
Constructor | Description |
---|---|
WebdavSession() |
Default constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
closeSession() |
Close an session and delete the connection information.
|
void |
closeSession(org.apache.commons.httpclient.HttpClient client) |
Deprecated.
Replaced by closeSession()
|
org.apache.commons.httpclient.HttpClient |
getSessionInstance(org.apache.commons.httpclient.HttpURL httpURL) |
Get a
HttpClient instance. |
org.apache.commons.httpclient.HttpClient |
getSessionInstance(org.apache.commons.httpclient.HttpURL httpURL,
boolean reset) |
Get a
HttpClient instance. |
void |
setCredentials(org.apache.commons.httpclient.Credentials credentials) |
Set credentials for authentication.
|
void |
setDebug(int debug) |
Set debug level.
|
void |
setProxy(java.lang.String host,
int port) |
Set proxy info, to use proxying.
|
void |
setProxyCredentials(org.apache.commons.httpclient.Credentials credentials) |
Set credentials for authenticating against a proxy.
|
protected org.apache.commons.httpclient.HttpClient client
protected org.apache.commons.httpclient.Credentials hostCredentials
protected java.lang.String proxyHost
protected int proxyPort
protected org.apache.commons.httpclient.Credentials proxyCredentials
protected int debug
public void setDebug(int debug)
public org.apache.commons.httpclient.HttpClient getSessionInstance(org.apache.commons.httpclient.HttpURL httpURL) throws java.io.IOException
HttpClient
instance.
This method returns a new client instance for the first time.
And it is saved util it's closed or reset.httpURL
- The http URL to connect. only used the authority part.HttpClient
.java.io.IOException
public org.apache.commons.httpclient.HttpClient getSessionInstance(org.apache.commons.httpclient.HttpURL httpURL, boolean reset) throws java.io.IOException
HttpClient
instance.
This method returns a new client instance, when reset is true.httpURL
- The http URL to connect. only used the authority part.reset
- The reset flag to represent whether the saved information
is used or not.HttpClient
.java.io.IOException
public void setCredentials(org.apache.commons.httpclient.Credentials credentials)
credentials
- The credentials to use for authentication.public void setProxy(java.lang.String host, int port)
public void setProxyCredentials(org.apache.commons.httpclient.Credentials credentials)
credentials
- The credentials to use for authentication.public void closeSession() throws java.io.IOException
java.io.IOException
- Error in closing socket.public void closeSession(org.apache.commons.httpclient.HttpClient client) throws java.io.IOException
client
- The HttpClient instance.java.io.IOException
- Error in closing socket.