|
|||||||||
| Home >> All >> org >> apache >> webdav >> [ lib overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.webdav.lib
Class WebdavSession

java.lang.Objectorg.apache.webdav.lib.WebdavSession
- Direct Known Subclasses:
- WebdavResource
- public abstract class WebdavSession
- extends java.lang.Object
This WebdavSession class is for the session management of WebDAV clients. This class saves and restores the requested client. Although this class is thread safe, it should only be accessed by one concurrent thread, since the underlying protocol, HTTP, is not multiplexed. If simultaneous operations are needed, it is recommended to create additional threads, each having its own associated WebDAV client. Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion.
| Field Summary | |
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 Summary | |
WebdavSession()
Default constructor. |
|
| Method Summary | |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
client
protected org.apache.commons.httpclient.HttpClient client
- The Http client instance.
hostCredentials
protected org.apache.commons.httpclient.Credentials hostCredentials
- Credentials to use for authentication
proxyHost
protected java.lang.String proxyHost
- The hostname to use for the proxy, if any
proxyPort
protected int proxyPort
- Port number to use for proxy, if any
proxyCredentials
protected org.apache.commons.httpclient.Credentials proxyCredentials
- Credentials to use for an authenticating proxy
debug
protected int debug
- Debug level.
| Constructor Detail |
WebdavSession
public WebdavSession()
- Default constructor.
| Method Detail |
setDebug
public void setDebug(int debug)
- Set debug level.
getSessionInstance
public org.apache.commons.httpclient.HttpClient getSessionInstance(org.apache.commons.httpclient.HttpURL httpURL) throws java.io.IOException
- Get a
HttpClientinstance. This method returns a new client instance for the first time. And it is saved util it's closed or reset.
getSessionInstance
public org.apache.commons.httpclient.HttpClient getSessionInstance(org.apache.commons.httpclient.HttpURL httpURL, boolean reset) throws java.io.IOException
- Get a
HttpClientinstance. This method returns a new client instance, when reset is true.
setCredentials
public void setCredentials(org.apache.commons.httpclient.Credentials credentials)
- Set credentials for authentication.
setProxy
public void setProxy(java.lang.String host, int port)
- Set proxy info, to use proxying.
setProxyCredentials
public void setProxyCredentials(org.apache.commons.httpclient.Credentials credentials)
- Set credentials for authenticating against a proxy.
closeSession
public void closeSession()
throws java.io.IOException
- Close an session and delete the connection information.
closeSession
public void closeSession(org.apache.commons.httpclient.HttpClient client) throws java.io.IOException
- Deprecated. Replaced by closeSession()
- Close an session and delete the connection information.
- Close an session and delete the connection information.
|
|||||||||
| Home >> All >> org >> apache >> webdav >> [ lib overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.webdav.lib.WebdavSession