Package 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 theXmlRpcLocalTransport, except that it adds request serialization. In other words, it is particularly well suited for development and testing of XML serialization and parsing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl
-
-
Field Summary
Fields Modifier and Type Field Description private LocalStreamConnectionconnprivate XmlRpcStreamRequestProcessorlocalServerprivate XmlRpcRequestrequest
-
Constructor Summary
Constructors Constructor Description XmlRpcLocalStreamTransport(XmlRpcClient pClient, XmlRpcStreamRequestProcessor pServer)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclose()Closes the connection and ensures, that all resources are being released.protected java.io.InputStreamgetInputStream()Returns the input stream, from which the response is being read.protected booleanisResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)Returns, whether the response is gzip compressed.protected XmlRpcStreamTransport.ReqWriternewReqWriter(XmlRpcRequest pRequest)Creates a new instance ofXmlRpcStreamTransport.ReqWriter.protected voidwriteRequest(XmlRpcStreamTransport.ReqWriter pWriter)-
Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
isCompressingRequest, newXMLReader, readResponse, sendRequest
-
Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl
getClient
-
-
-
-
Field Detail
-
localServer
private final XmlRpcStreamRequestProcessor localServer
-
conn
private LocalStreamConnection conn
-
request
private XmlRpcRequest request
-
-
Constructor Detail
-
XmlRpcLocalStreamTransport
public XmlRpcLocalStreamTransport(XmlRpcClient pClient, XmlRpcStreamRequestProcessor pServer)
Creates a new instance.- Parameters:
pClient- The client, which is controlling the transport.pServer- An instance ofXmlRpcStreamRequestProcessor.
-
-
Method Detail
-
isResponseGzipCompressed
protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
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.
-
close
protected void close() throws XmlRpcClientExceptionDescription copied from class:XmlRpcStreamTransportCloses the connection and ensures, that all resources are being released.- Specified by:
closein classXmlRpcStreamTransport- Throws:
XmlRpcClientException
-
getInputStream
protected java.io.InputStream getInputStream() throws XmlRpcExceptionDescription copied from class:XmlRpcStreamTransportReturns the input stream, from which the response is being read.- Specified by:
getInputStreamin classXmlRpcStreamTransport- Throws:
XmlRpcException
-
newReqWriter
protected XmlRpcStreamTransport.ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, java.io.IOException, org.xml.sax.SAXException
Description copied from class:XmlRpcStreamTransportCreates a new instance ofXmlRpcStreamTransport.ReqWriter.- Overrides:
newReqWriterin classXmlRpcStreamTransport- Throws:
XmlRpcException- Creating the instance failed.java.io.IOException- Creating the instance failed, because anIOExceptionoccurs.org.xml.sax.SAXException- Creating the instance failed, because the request could not be parsed.
-
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws XmlRpcException, java.io.IOException, org.xml.sax.SAXException
- Specified by:
writeRequestin classXmlRpcStreamTransport- Throws:
XmlRpcExceptionjava.io.IOExceptionorg.xml.sax.SAXException
-
-