org.apache.xmlrpc.client
Class XmlRpcCommonsTransport

java.lang.Object
  extended by org.apache.xmlrpc.client.XmlRpcTransportImpl
      extended by org.apache.xmlrpc.client.XmlRpcStreamTransport
          extended by org.apache.xmlrpc.client.XmlRpcHttpTransport
              extended by org.apache.xmlrpc.client.XmlRpcCommonsTransport
All Implemented Interfaces:
XmlRpcTransport

public class XmlRpcCommonsTransport
extends XmlRpcHttpTransport

An HTTP transport factory, which is based on the Jakarta Commons HTTP Client.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
XmlRpcHttpTransport.ByteArrayReqWriter
 
Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl
 
Field Summary
 
Fields inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
USER_AGENT
 
Constructor Summary
XmlRpcCommonsTransport(XmlRpcClient pClient)
          Creates a new instance.
 
Method Summary
protected  void close()
          Closes the connection and ensures, that all resources are being released.
protected  java.io.InputStream getInputStream()
          Returns the input stream, from which the response is being read.
protected  void initHttpHeaders(XmlRpcRequest pRequest)
           
protected  boolean isResponseGzipCompressed()
           
protected  boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
          Returns, whether the response is gzip compressed.
protected  void setContentLength(int pLength)
           
protected  void setCredentials(XmlRpcHttpClientConfig pConfig)
           
protected  void setRequestHeader(java.lang.String pHeader, java.lang.String pValue)
           
protected  void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter)
           
 
Methods inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
getUserAgent, isUsingByteArrayOutput, newReqWriter, sendRequest, setCompressionHeaders
 
Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
isCompressingRequest, newXMLReader, readResponse
 
Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl
getClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcCommonsTransport

public XmlRpcCommonsTransport(XmlRpcClient pClient)
Creates a new instance.

Parameters:
pClient - The client, which will be invoking the transport.
Method Detail

setContentLength

protected void setContentLength(int pLength)
Overrides:
setContentLength in class XmlRpcHttpTransport

initHttpHeaders

protected void initHttpHeaders(XmlRpcRequest pRequest)
                        throws XmlRpcClientException
Overrides:
initHttpHeaders in class XmlRpcHttpTransport
Throws:
XmlRpcClientException

setRequestHeader

protected void setRequestHeader(java.lang.String pHeader,
                                java.lang.String pValue)
Specified by:
setRequestHeader in class XmlRpcHttpTransport

isResponseGzipCompressed

protected boolean isResponseGzipCompressed()

getInputStream

protected java.io.InputStream getInputStream()
                                      throws XmlRpcException
Description copied from class: XmlRpcStreamTransport
Returns the input stream, from which the response is being read.

Specified by:
getInputStream in class XmlRpcStreamTransport
Throws:
XmlRpcException

setCredentials

protected void setCredentials(XmlRpcHttpClientConfig pConfig)
                       throws XmlRpcClientException
Overrides:
setCredentials in class XmlRpcHttpTransport
Throws:
XmlRpcClientException

close

protected void close()
              throws XmlRpcClientException
Description copied from class: XmlRpcStreamTransport
Closes the connection and ensures, that all resources are being released.

Specified by:
close in class XmlRpcStreamTransport
Throws:
XmlRpcClientException

isResponseGzipCompressed

protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
Description copied from class: XmlRpcStreamTransport
Returns, whether the response is gzip compressed.

Specified by:
isResponseGzipCompressed in class XmlRpcStreamTransport
Parameters:
pConfig - The clients configuration.
Returns:
Whether the response stream is gzip compressed.

writeRequest

protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter)
                     throws XmlRpcException
Specified by:
writeRequest in class XmlRpcStreamTransport
Throws:
XmlRpcException