|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.skunk.dav.client.DAVConnection
An http connection that can execute DAVMethod objects.
| Field Summary | |
static int |
DEFAULT_SOCKET_TIMEOUT
|
static java.lang.String |
SOCKET_TIMEOUT_PROPERTY
|
| Constructor Summary | |
DAVConnection(java.lang.String host,
int port)
creates an DAVConnection over the http protocol |
|
DAVConnection(java.lang.String host,
int port,
boolean https)
creates a DAVConnection |
|
| Method Summary | |
void |
closeConnection()
closes the connection |
void |
execute(DAVMethod method)
executes a DAVMethod |
java.lang.String |
getHost()
returns the host |
int |
getPort()
returns the port |
java.lang.String |
getProtocol()
returns the protocol, either "http" or "https" |
int |
getSocketTimeout()
|
java.lang.String |
getUsername()
returns the username |
boolean |
isClosed()
indicates whether the connection is closed or not |
void |
openConnection()
opens the connection |
protected void |
processResponse(DAVMethod method,
HTTPClient.HTTPResponse res)
|
void |
setAuthenticator(DAVAuthenticator authenticator)
set a DAVAuthenticator for this connection. |
void |
setAuthorization(java.lang.String authorization)
sets an encoded authorization string |
void |
setSocketTimeout(int socketTimeout)
|
void |
setUsername(java.lang.String username)
sets the username |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String SOCKET_TIMEOUT_PROPERTY
public static final int DEFAULT_SOCKET_TIMEOUT
| Constructor Detail |
public DAVConnection(java.lang.String host,
int port)
host - the hostnameport - the port
public DAVConnection(java.lang.String host,
int port,
boolean https)
host - the host to which to connectport - the port on which to connecthttps - whether to use https or http (https if true, http otherwise)| Method Detail |
public java.lang.String getProtocol()
public void setAuthenticator(DAVAuthenticator authenticator)
authenticator - a DAVAuthenticatorpublic void setAuthorization(java.lang.String authorization)
authorization - the authorization stringpublic boolean isClosed()
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
public void openConnection()
public void closeConnection()
public void execute(DAVMethod method)
throws java.io.IOException,
DAVException
method - the DAVMethod instance
protected void processResponse(DAVMethod method,
HTTPClient.HTTPResponse res)
throws java.io.IOException,
HTTPClient.ModuleException,
DAVException
public java.lang.String getHost()
public int getPort()
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username - the username
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||