Package org.apache.xmlrpc.client
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 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
FieldsFields inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
USER_AGENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close()
Closes the connection and ensures, that all resources are being released.protected InputStream
Returns the input stream, from which the response is being read.protected URLConnection
For use by subclasses.protected boolean
Returns, whether the response is gzip compressed.protected URLConnection
newURLConnection
(URL pURL) sendRequest
(XmlRpcRequest pRequest) Send an XML-RPC message.protected void
setRequestHeader
(String pHeader, String pValue) protected void
Methods inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
getUserAgent, initHttpHeaders, isUsingByteArrayOutput, newReqWriter, setCompressionHeaders, setContentLength, setCredentials
Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
isCompressingRequest, newXMLReader, readResponse
Methods inherited from class org.apache.xmlrpc.client.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:XmlRpcTransport
Send an XML-RPC message. This method is called to send a message to the other party.- Specified by:
sendRequest
in interfaceXmlRpcTransport
- Overrides:
sendRequest
in 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:
setRequestHeader
in classXmlRpcHttpTransport
-
close
Description copied from class:XmlRpcStreamTransport
Closes the connection and ensures, that all resources are being released.- Specified by:
close
in classXmlRpcStreamTransport
- Throws:
XmlRpcClientException
-
isResponseGzipCompressed
Description copied from class:XmlRpcStreamTransport
Returns, whether the response is gzip compressed.- Specified by:
isResponseGzipCompressed
in classXmlRpcStreamTransport
- Parameters:
pConfig
- The clients configuration.- Returns:
- Whether the response stream is gzip compressed.
-
getInputStream
Description copied from class:XmlRpcStreamTransport
Returns the input stream, from which the response is being read.- Specified by:
getInputStream
in classXmlRpcStreamTransport
- Throws:
XmlRpcException
-
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws IOException, XmlRpcException, SAXException - Specified by:
writeRequest
in classXmlRpcStreamTransport
- Throws:
IOException
XmlRpcException
SAXException
-