|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.skunk.dav.client.AbstractDAVMethod
base class for DAV methods.
| Constructor Summary | |
AbstractDAVMethod(java.lang.String path)
|
|
| Method Summary | |
protected static java.lang.Integer |
extractStatus(java.lang.String statusLine)
convenience function for parsing the status header. |
DAVFile |
getDAVFile()
|
java.lang.String |
getHost()
gets the hostname of the server. |
int |
getPort()
gets the port where the file in question is served. |
java.lang.String |
getProtocol()
returns the protocol |
byte[] |
getRequestBody()
returns the body of the request |
java.util.Map |
getRequestHeaders()
gets the headers of the request |
java.lang.String |
getRequestURL()
returns the path requested |
byte[] |
getResponseBody()
returns the body of the response |
java.util.Map |
getResponseHeaders()
|
int |
getStatus()
|
protected void |
processPropElement(DAVFile file,
XMLElement elem)
by default, passes the properties off to PropertyHandler |
void |
processRequestBody()
a hook for processing the request body. |
void |
processRequestHeaders()
a hook for processing the request headers. |
void |
processResponseBody()
a hook into processing the body of the response. |
void |
processResponseHeaders()
a hook for processing the response headers. |
void |
setHost(java.lang.String host)
sets the hostname |
void |
setPort(int port)
sets the port |
void |
setProtocol(java.lang.String protocol)
sets the protocol |
void |
setRequestBody(byte[] b)
sets the body of the request. |
void |
setRequestHeaders(java.util.Map m)
sets the headers of the request |
void |
setResponseBody(byte[] body)
used to populate the body of the response |
void |
setResponseHeaders(java.util.Map headers)
used to populate the headers of the response |
void |
setStatus(int status)
used to the populate the status of the response |
protected static java.lang.String |
stripLastSlash(java.lang.String path)
chomps the last slash off a path, which may not be null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.skunk.dav.client.DAVMethod |
getRequestMethodName |
| Constructor Detail |
public AbstractDAVMethod(java.lang.String path)
path - the resource on which the method is performed| Method Detail |
public void setProtocol(java.lang.String protocol)
setProtocol in interface DAVMethodprotocol - the protocolpublic java.lang.String getProtocol()
public void setHost(java.lang.String host)
setHost in interface DAVMethodhost - the hostnamepublic void setPort(int port)
setPort in interface DAVMethodport - the portpublic java.lang.String getHost()
public int getPort()
public java.util.Map getRequestHeaders()
getRequestHeaders in interface DAVMethodpublic void setRequestHeaders(java.util.Map m)
setRequestHeaders in interface DAVMethodm - a map of header names and valuespublic void setRequestBody(byte[] b)
setRequestBody in interface DAVMethodb - the new request bodypublic java.lang.String getRequestURL()
getRequestURL in interface DAVMethodpublic byte[] getRequestBody()
getRequestBody in interface DAVMethodpublic void setResponseHeaders(java.util.Map headers)
setResponseHeaders in interface DAVMethodheaders - a mapping of headers names to valuespublic void setResponseBody(byte[] body)
setResponseBody in interface DAVMethodorg.skunk.dav.client.DAVMethodb - the new request bodypublic java.util.Map getResponseHeaders()
getResponseHeaders in interface DAVMethodpublic byte[] getResponseBody()
DAVMethodgetResponseBody in interface DAVMethodpublic int getStatus()
getStatus in interface DAVMethodpublic void setStatus(int status)
setStatus in interface DAVMethodstatus - the statuspublic DAVFile getDAVFile()
getDAVFile in interface DAVMethod
public void processResponseBody()
throws MalformedXMLException
processResponseBody in interface DAVMethodorg.skunk.dav.client.DAVMethodMalformedXMLException - if an XML response is expected
and it is not well-formed.public void processResponseHeaders()
processResponseHeaders in interface DAVMethodpublic void processRequestHeaders()
processRequestHeaders in interface DAVMethodpublic void processRequestBody()
processRequestBody in interface DAVMethodprotected static final java.lang.String stripLastSlash(java.lang.String path)
path - the path to chomp
protected void processPropElement(DAVFile file,
XMLElement elem)
file - the DAVFile in which the results are storedelem - the prop XMLElement being processedprotected static final java.lang.Integer extractStatus(java.lang.String statusLine)
statusLine - the HTTP status line
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||