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
public class XmlRpcSunHttpTransport
- extends XmlRpcHttpTransport
Default implementation of an HTTP transport, based on the
HttpURLConnection
class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlRpcSunHttpTransport
public XmlRpcSunHttpTransport(XmlRpcClient pClient)
- Creates a new instance.
- Parameters:
pClient
- The client controlling this instance.
newURLConnection
protected java.net.URLConnection newURLConnection(java.net.URL pURL)
throws java.io.IOException
- Throws:
java.io.IOException
getURLConnection
protected java.net.URLConnection getURLConnection()
- For use by subclasses.
sendRequest
public java.lang.Object sendRequest(XmlRpcRequest pRequest)
throws XmlRpcException
- 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 interface XmlRpcTransport
- Overrides:
sendRequest
in class XmlRpcHttpTransport
- Parameters:
pRequest
- The request being performed.
- Returns:
- Result object, if invoking the remote method was successfull.
- Throws:
XmlRpcException
- Performing the request failed.
setRequestHeader
protected void setRequestHeader(java.lang.String pHeader,
java.lang.String pValue)
- Specified by:
setRequestHeader
in class XmlRpcHttpTransport
close
protected void close()
throws XmlRpcClientException
- Description copied from class:
XmlRpcStreamTransport
- Closes the connection and ensures, that all resources are being
released.
- Specified by:
close
in class XmlRpcStreamTransport
- Throws:
XmlRpcClientException
isResponseGzipCompressed
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
- Description copied from class:
XmlRpcStreamTransport
- Returns, whether the response is gzip compressed.
- Specified by:
isResponseGzipCompressed
in class XmlRpcStreamTransport
- Parameters:
pConfig
- The clients configuration.
- Returns:
- Whether the response stream is gzip compressed.
getInputStream
protected java.io.InputStream getInputStream()
throws XmlRpcException
- Description copied from class:
XmlRpcStreamTransport
- Returns the input stream, from which the response is
being read.
- Specified by:
getInputStream
in class XmlRpcStreamTransport
- Throws:
XmlRpcException
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter)
throws java.io.IOException,
XmlRpcException,
org.xml.sax.SAXException
- Specified by:
writeRequest
in class XmlRpcStreamTransport
- Throws:
java.io.IOException
XmlRpcException
org.xml.sax.SAXException
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.