Class XmlRpcSunHttpTransport
java.lang.Object
org.apache.xmlrpc.client.XmlRpcTransportImpl
org.apache.xmlrpc.client.XmlRpcStreamTransport
org.apache.xmlrpc.client.XmlRpcHttpTransport
org.apache.xmlrpc.client.XmlRpcSunHttpTransport
- All Implemented Interfaces:
XmlRpcTransport
- Direct Known Subclasses:
XmlRpcSun14HttpTransport
Default implementation of an HTTP transport, based on the
HttpURLConnection class.-
Nested Class Summary
Nested classes/interfaces inherited from class XmlRpcHttpTransport
XmlRpcHttpTransport.ByteArrayReqWriterNested classes/interfaces inherited from class XmlRpcStreamTransport
XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl -
Field Summary
FieldsFields inherited from class XmlRpcHttpTransport
USER_AGENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclose()Closes the connection and ensures, that all resources are being released.protected InputStreamReturns the input stream, from which the response is being read.protected URLConnectionFor use by subclasses.protected booleanReturns, whether the response is gzip compressed.protected URLConnectionnewURLConnection(URL pURL) sendRequest(XmlRpcRequest pRequest) Send an XML-RPC message.protected voidsetRequestHeader(String pHeader, String pValue) protected voidMethods inherited from class XmlRpcHttpTransport
getUserAgent, initHttpHeaders, isUsingByteArrayOutput, newReqWriter, setCompressionHeaders, setContentLength, setCredentialsMethods inherited from class XmlRpcStreamTransport
isCompressingRequest, newXMLReader, readResponseMethods inherited from class XmlRpcTransportImpl
getClient
-
Field Details
-
userAgent
-
conn
-
-
Constructor Details
-
XmlRpcSunHttpTransport
Creates a new instance.- Parameters:
pClient- The client controlling this instance.
-
-
Method Details
-
newURLConnection
- Throws:
IOException
-
getURLConnection
For use by subclasses. -
sendRequest
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 classXmlRpcHttpTransport- Parameters:
pRequest- The request being performed.- Returns:
- Result object, if invoking the remote method was successfull.
- Throws:
XmlRpcException- Performing the request failed.
-
setRequestHeader
- Specified by:
setRequestHeaderin classXmlRpcHttpTransport
-
close
Description copied from class:XmlRpcStreamTransportCloses the connection and ensures, that all resources are being released.- Specified by:
closein classXmlRpcStreamTransport- Throws:
XmlRpcClientException
-
isResponseGzipCompressed
Description copied from class:XmlRpcStreamTransportReturns, whether the response is gzip compressed.- Specified by:
isResponseGzipCompressedin classXmlRpcStreamTransport- Parameters:
pConfig- The clients configuration.- Returns:
- Whether the response stream is gzip compressed.
-
getInputStream
Description copied from class:XmlRpcStreamTransportReturns the input stream, from which the response is being read.- Specified by:
getInputStreamin classXmlRpcStreamTransport- Throws:
XmlRpcException
-
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws IOException, XmlRpcException, SAXException - Specified by:
writeRequestin classXmlRpcStreamTransport- Throws:
IOExceptionXmlRpcExceptionSAXException
-