Package org.apache.xmlrpc.client
Class XmlRpcHttpTransport
- java.lang.Object
-
- org.apache.xmlrpc.client.XmlRpcTransportImpl
-
- org.apache.xmlrpc.client.XmlRpcStreamTransport
-
- org.apache.xmlrpc.client.XmlRpcHttpTransport
-
- All Implemented Interfaces:
XmlRpcTransport
- Direct Known Subclasses:
XmlRpcCommonsTransport,XmlRpcLiteHttpTransport,XmlRpcSunHttpTransport
public abstract class XmlRpcHttpTransport extends XmlRpcStreamTransport
Abstract base implementation of an HTTP transport. Base class for the concrete implementations, likeXmlRpcSunHttpTransport, orXmlRpcCommonsTransport.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classXmlRpcHttpTransport.ByteArrayReqWriter-
Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUSER_AGENTThe user agent string.private java.lang.StringuserAgent
-
Constructor Summary
Constructors Modifier Constructor Description protectedXmlRpcHttpTransport(XmlRpcClient pClient, java.lang.String pUserAgent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetUserAgent()protected voidinitHttpHeaders(XmlRpcRequest pRequest)protected booleanisUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig)protected XmlRpcStreamTransport.ReqWriternewReqWriter(XmlRpcRequest pRequest)Creates a new instance ofXmlRpcStreamTransport.ReqWriter.java.lang.ObjectsendRequest(XmlRpcRequest pRequest)Send an XML-RPC message.protected voidsetCompressionHeaders(XmlRpcHttpClientConfig pConfig)protected voidsetContentLength(int pLength)protected voidsetCredentials(XmlRpcHttpClientConfig pConfig)protected abstract voidsetRequestHeader(java.lang.String pHeader, java.lang.String pValue)-
Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
close, getInputStream, isCompressingRequest, isResponseGzipCompressed, newXMLReader, readResponse, writeRequest
-
Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl
getClient
-
-
-
-
Constructor Detail
-
XmlRpcHttpTransport
protected XmlRpcHttpTransport(XmlRpcClient pClient, java.lang.String pUserAgent)
-
-
Method Detail
-
getUserAgent
protected java.lang.String getUserAgent()
-
setRequestHeader
protected abstract void setRequestHeader(java.lang.String pHeader, java.lang.String pValue)
-
setCredentials
protected void setCredentials(XmlRpcHttpClientConfig pConfig) throws XmlRpcClientException
- Throws:
XmlRpcClientException
-
setContentLength
protected void setContentLength(int pLength)
-
setCompressionHeaders
protected void setCompressionHeaders(XmlRpcHttpClientConfig pConfig)
-
initHttpHeaders
protected void initHttpHeaders(XmlRpcRequest pRequest) throws XmlRpcClientException
- Throws:
XmlRpcClientException
-
sendRequest
public java.lang.Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException
Description copied from interface:XmlRpcTransportSend an XML-RPC message. This method is called to send a message to the other party.- Specified by:
sendRequestin interfaceXmlRpcTransport- Overrides:
sendRequestin classXmlRpcStreamTransport- Parameters:
pRequest- The request being performed.- Returns:
- Result object, if invoking the remote method was successfull.
- Throws:
XmlRpcException- Performing the request failed.
-
isUsingByteArrayOutput
protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig)
-
newReqWriter
protected XmlRpcStreamTransport.ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, java.io.IOException, org.xml.sax.SAXException
Description copied from class:XmlRpcStreamTransportCreates a new instance ofXmlRpcStreamTransport.ReqWriter.- Overrides:
newReqWriterin classXmlRpcStreamTransport- Throws:
XmlRpcException- Creating the instance failed.java.io.IOException- Creating the instance failed, because anIOExceptionoccurs.org.xml.sax.SAXException- Creating the instance failed, because the request could not be parsed.
-
-