public class XmlRpcSunHttpTransport extends XmlRpcHttpTransport
HttpURLConnection
class.XmlRpcHttpTransport.ByteArrayReqWriter
XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl
USER_AGENT
Constructor and Description |
---|
XmlRpcSunHttpTransport(XmlRpcClient pClient)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close()
Closes the connection and ensures, that all resources are being
released.
|
protected InputStream |
getInputStream()
Returns the input stream, from which the response is
being read.
|
protected URLConnection |
getURLConnection()
For use by subclasses.
|
protected boolean |
isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
Returns, whether the response is gzip compressed.
|
protected URLConnection |
newURLConnection(URL pURL) |
Object |
sendRequest(XmlRpcRequest pRequest)
Send an XML-RPC message.
|
protected void |
setRequestHeader(String pHeader,
String pValue) |
protected void |
writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) |
getUserAgent, initHttpHeaders, isUsingByteArrayOutput, newReqWriter, setCompressionHeaders, setContentLength, setCredentials
isCompressingRequest, newXMLReader, readResponse
getClient
public XmlRpcSunHttpTransport(XmlRpcClient pClient)
pClient
- The client controlling this instance.protected URLConnection newURLConnection(URL pURL) throws IOException
IOException
protected URLConnection getURLConnection()
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException
XmlRpcTransport
sendRequest
in interface XmlRpcTransport
sendRequest
in class XmlRpcHttpTransport
pRequest
- The request being performed.XmlRpcException
- Performing the request failed.protected void setRequestHeader(String pHeader, String pValue)
setRequestHeader
in class XmlRpcHttpTransport
protected void close() throws XmlRpcClientException
XmlRpcStreamTransport
close
in class XmlRpcStreamTransport
XmlRpcClientException
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
XmlRpcStreamTransport
isResponseGzipCompressed
in class XmlRpcStreamTransport
pConfig
- The clients configuration.protected InputStream getInputStream() throws XmlRpcException
XmlRpcStreamTransport
getInputStream
in class XmlRpcStreamTransport
XmlRpcException
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws IOException, XmlRpcException, SAXException
writeRequest
in class XmlRpcStreamTransport
IOException
XmlRpcException
SAXException
Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.