org.apache.xmlrpc.client
Class XmlRpcLocalStreamTransport
java.lang.Object
org.apache.xmlrpc.client.XmlRpcTransportImpl
org.apache.xmlrpc.client.XmlRpcStreamTransport
org.apache.xmlrpc.client.XmlRpcLocalStreamTransport
- All Implemented Interfaces:
- XmlRpcTransport
public class XmlRpcLocalStreamTransport
- extends XmlRpcStreamTransport
Another local transport for debugging and testing. This one is
similar to the XmlRpcLocalTransport
,
except that it adds request serialization. In other words, it is
particularly well suited for development and testing of XML serialization
and parsing.
Field Summary |
private org.apache.xmlrpc.common.LocalStreamConnection |
conn
|
private org.apache.xmlrpc.common.XmlRpcStreamRequestProcessor |
localServer
|
private org.apache.xmlrpc.XmlRpcRequest |
request
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
localServer
private final org.apache.xmlrpc.common.XmlRpcStreamRequestProcessor localServer
conn
private org.apache.xmlrpc.common.LocalStreamConnection conn
request
private org.apache.xmlrpc.XmlRpcRequest request
XmlRpcLocalStreamTransport
public XmlRpcLocalStreamTransport(XmlRpcClient pClient,
org.apache.xmlrpc.common.XmlRpcStreamRequestProcessor pServer)
- Creates a new instance.
- Parameters:
pClient
- The client, which is controlling the transport.pServer
- An instance of XmlRpcStreamRequestProcessor
.
isResponseGzipCompressed
protected boolean isResponseGzipCompressed(org.apache.xmlrpc.common.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.
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
getInputStream
protected java.io.InputStream getInputStream()
throws org.apache.xmlrpc.XmlRpcException
- Description copied from class:
XmlRpcStreamTransport
- Returns the input stream, from which the response is
being read.
- Specified by:
getInputStream
in class XmlRpcStreamTransport
- Throws:
org.apache.xmlrpc.XmlRpcException
newReqWriter
protected XmlRpcStreamTransport.ReqWriter newReqWriter(org.apache.xmlrpc.XmlRpcRequest pRequest)
throws org.apache.xmlrpc.XmlRpcException,
java.io.IOException,
org.xml.sax.SAXException
- Description copied from class:
XmlRpcStreamTransport
- Creates a new instance of
XmlRpcStreamTransport.ReqWriter
.
- Overrides:
newReqWriter
in class XmlRpcStreamTransport
- Throws:
org.apache.xmlrpc.XmlRpcException
- Creating the instance failed.
java.io.IOException
- Creating the instance failed, because
an IOException
occurs.
org.xml.sax.SAXException
- Creating the instance failed, because
the request could not be parsed.
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter)
throws org.apache.xmlrpc.XmlRpcException,
java.io.IOException,
org.xml.sax.SAXException
- Specified by:
writeRequest
in class XmlRpcStreamTransport
- Throws:
org.apache.xmlrpc.XmlRpcException
java.io.IOException
org.xml.sax.SAXException