org.outerj.daisy.repository.clientimpl.infrastructure
Class DaisyHttpClient

java.lang.Object
  extended byorg.outerj.daisy.repository.clientimpl.infrastructure.DaisyHttpClient

public class DaisyHttpClient
extends java.lang.Object


Constructor Summary
DaisyHttpClient(org.apache.commons.httpclient.HttpClient sharedHttpClient, org.apache.commons.httpclient.HostConfiguration sharedHostConfiguration, org.apache.commons.httpclient.HttpState httpState)
           
 
Method Summary
 org.apache.xmlbeans.XmlObject executeMethod(org.apache.commons.httpclient.HttpMethod method, java.lang.Class xmlObjectResponseClass, boolean releaseConnection)
          Executes the given method, and handles the response to take care of exceptions or non-OK responses, and optionally parses the response body according to the specified XmlObject class.
static java.lang.String getContentType(org.apache.commons.httpclient.HttpMethod method)
           
 void handleNotOkResponse(org.apache.commons.httpclient.HttpMethod method)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DaisyHttpClient

public DaisyHttpClient(org.apache.commons.httpclient.HttpClient sharedHttpClient,
                       org.apache.commons.httpclient.HostConfiguration sharedHostConfiguration,
                       org.apache.commons.httpclient.HttpState httpState)
Method Detail

executeMethod

public org.apache.xmlbeans.XmlObject executeMethod(org.apache.commons.httpclient.HttpMethod method,
                                                   java.lang.Class xmlObjectResponseClass,
                                                   boolean releaseConnection)
                                            throws org.outerj.daisy.repository.RepositoryException
Executes the given method, and handles the response to take care of exceptions or non-OK responses, and optionally parses the response body according to the specified XmlObject class. If this method returns without throwing an exception, one can assume that the execution of the HTTP method was successful.

Parameters:
xmlObjectResponseClass - an Apache XmlBeans generated class (having a Factory inner class).
Returns:
the XmlObject resulting from the parsing of the response body, or null if no XmlObject class was specified.
Throws:
org.outerj.daisy.repository.RepositoryException

getContentType

public static java.lang.String getContentType(org.apache.commons.httpclient.HttpMethod method)
                                       throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

handleNotOkResponse

public void handleNotOkResponse(org.apache.commons.httpclient.HttpMethod method)
                         throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException


Copyright © -2005 . All Rights Reserved.