org.apache.xmlrpc.client

Class XmlRpcHttpTransport

Implemented Interfaces:
XmlRpcTransport
Known Direct Subclasses:
XmlRpcCommonsTransport, XmlRpcLiteHttpTransport, XmlRpcSunHttpTransport

public abstract class XmlRpcHttpTransport
extends XmlRpcStreamTransport

Abstract base implementation of an HTTP transport. Base class for the concrete implementations, like XmlRpcSunHttpTransport, or XmlRpcCommonsTransport.

Nested Class Summary

protected class
XmlRpcHttpTransport.ByteArrayReqWriter

Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport

XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl

Field Summary

static String
USER_AGENT
The user agent string.

Constructor Summary

XmlRpcHttpTransport(XmlRpcClient pClient, String pUserAgent)

Method Summary

protected String
getUserAgent()
protected void
initHttpHeaders(XmlRpcRequest pRequest)
protected boolean
isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig)
protected XmlRpcStreamTransport.ReqWriter
newReqWriter(XmlRpcRequest pRequest)
Object
sendRequest(XmlRpcRequest pRequest)
Send an XML-RPC message.
protected void
setCompressionHeaders(XmlRpcHttpClientConfig pConfig)
protected void
setContentLength(int pLength)
protected void
setCredentials(XmlRpcHttpClientConfig pConfig)
protected abstract void
setRequestHeader(String pHeader, String pValue)

Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport

close, getInputStream, isCompressingRequest, isResponseGzipCompressed, newReqWriter, newXMLReader, readResponse, sendRequest, writeRequest

Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl

getClient

Field Details

USER_AGENT

public static final String USER_AGENT
The user agent string.

Constructor Details

XmlRpcHttpTransport

protected XmlRpcHttpTransport(XmlRpcClient pClient,
                              String pUserAgent)

Method Details

getUserAgent

protected String getUserAgent()

initHttpHeaders

protected void initHttpHeaders(XmlRpcRequest pRequest)
            throws XmlRpcClientException

isUsingByteArrayOutput

protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig)

newReqWriter

protected XmlRpcStreamTransport.ReqWriter newReqWriter(XmlRpcRequest pRequest)
            throws XmlRpcException,
                   IOException,
                   SAXException
Overrides:
newReqWriter in interface XmlRpcStreamTransport

sendRequest

public Object sendRequest(XmlRpcRequest pRequest)
            throws XmlRpcException
Send an XML-RPC message. This method is called to send a message to the other party.
Specified by:
sendRequest in interface XmlRpcTransport
Overrides:
sendRequest in interface XmlRpcStreamTransport
Parameters:
pRequest - The request being performed.
Returns:
Result object, if invoking the remote method was successfull.
Throws:
XmlRpcException - Performing the request failed.

setCompressionHeaders

protected void setCompressionHeaders(XmlRpcHttpClientConfig pConfig)

setContentLength

protected void setContentLength(int pLength)

setCredentials

protected void setCredentials(XmlRpcHttpClientConfig pConfig)
            throws XmlRpcClientException

setRequestHeader

protected abstract void setRequestHeader(String pHeader,
                                         String pValue)

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.