org.skunk.dav.client
Interface DAVMethod

All Known Implementing Classes:
AbstractDAVMethod

public interface DAVMethod


Method Summary
 DAVFile getDAVFile()
           
 byte[] getRequestBody()
          returns the body of the request
 java.util.Map getRequestHeaders()
          gets the headers of the request
 DAVMethodName getRequestMethodName()
          returns the method name
 java.lang.String getRequestURL()
          returns the path requested
 byte[] getResponseBody()
          returns the body of the response
 java.util.Map getResponseHeaders()
           
 int getStatus()
           
 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[] body)
          sets the body of the request.
 void setRequestHeaders(java.util.Map headers)
          sets the headers of the request
 void setResponseBody(byte[] body)
          sets the body of the request.
 void setResponseHeaders(java.util.Map m)
          used to populate the headers of the response
 void setStatus(int status)
          used to the populate the status of the response
 

Method Detail

processRequestHeaders

public void processRequestHeaders()
a hook for processing the request headers

processRequestBody

public void processRequestBody()
a hook for processing the request body.

processResponseHeaders

public void processResponseHeaders()
a hook for processing the response headers.

processResponseBody

public void processResponseBody()
                         throws MalformedXMLException
a hook into processing the body of the response.
Throws:
MalformedXMLException - if an XML response is expected and it is not well-formed.

getDAVFile

public DAVFile getDAVFile()
Returns:
the DAVFile corresponding to the resourceURL.

getResponseHeaders

public java.util.Map getResponseHeaders()
Returns:
the headers of the response

setResponseHeaders

public void setResponseHeaders(java.util.Map m)
used to populate the headers of the response
Parameters:
headers - a mapping of headers names to values

getResponseBody

public byte[] getResponseBody()
returns the body of the response
Returns:
the body of the response

setResponseBody

public void setResponseBody(byte[] body)
sets the body of the request.
Parameters:
b - the new request body

getStatus

public int getStatus()
Returns:
the status of the response

setStatus

public void setStatus(int status)
used to the populate the status of the response
Parameters:
status - the status

getRequestHeaders

public java.util.Map getRequestHeaders()
gets the headers of the request
Returns:
the request headers

setRequestHeaders

public void setRequestHeaders(java.util.Map headers)
sets the headers of the request
Parameters:
m - a map of header names and values

getRequestMethodName

public DAVMethodName getRequestMethodName()
returns the method name
Returns:
the DAVMethodName of the method

getRequestURL

public java.lang.String getRequestURL()
returns the path requested
Returns:
the path requested.

getRequestBody

public byte[] getRequestBody()
returns the body of the request
Returns:
the body of the request, if any, or null

setRequestBody

public void setRequestBody(byte[] body)
sets the body of the request.
Parameters:
body - the new request body

setHost

public void setHost(java.lang.String host)
sets the hostname
Parameters:
host - the hostname

setPort

public void setPort(int port)
sets the port
Parameters:
port - the port

setProtocol

public void setProtocol(java.lang.String protocol)
sets the protocol
Parameters:
protocol - the protocol