Package org.apache.xmlrpc.client
Class XmlRpcStreamTransport
java.lang.Object
org.apache.xmlrpc.client.XmlRpcTransportImpl
org.apache.xmlrpc.client.XmlRpcStreamTransport
- All Implemented Interfaces:
XmlRpcTransport
- Direct Known Subclasses:
XmlRpcHttpTransport
,XmlRpcLocalStreamTransport
Implementation of a transport class, which is based on an output
stream for sending the request and an input stream for receiving
the response,
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
protected static interface
protected class
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
XmlRpcStreamTransport
(XmlRpcClient pClient) Creates a new instance on behalf of the given client. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
close()
Closes the connection and ensures, that all resources are being released.protected abstract InputStream
Returns the input stream, from which the response is being read.protected boolean
protected abstract boolean
Returns, whether the response is gzip compressed.protected XmlRpcStreamTransport.ReqWriter
newReqWriter
(XmlRpcRequest pRequest) Creates a new instance ofXmlRpcStreamTransport.ReqWriter
.protected XMLReader
protected Object
readResponse
(XmlRpcStreamRequestConfig pConfig, InputStream pStream) sendRequest
(XmlRpcRequest pRequest) Send an XML-RPC message.protected abstract void
Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl
getClient
-
Constructor Details
-
XmlRpcStreamTransport
Creates a new instance on behalf of the given client.
-
-
Method Details
-
close
Closes the connection and ensures, that all resources are being released.- Throws:
XmlRpcClientException
-
isResponseGzipCompressed
Returns, whether the response is gzip compressed.- Parameters:
pConfig
- The clients configuration.- Returns:
- Whether the response stream is gzip compressed.
-
getInputStream
Returns the input stream, from which the response is being read.- Throws:
XmlRpcException
-
isCompressingRequest
-
newReqWriter
protected XmlRpcStreamTransport.ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException Creates a new instance ofXmlRpcStreamTransport.ReqWriter
.- Throws:
XmlRpcException
- Creating the instance failed.IOException
- Creating the instance failed, because anIOException
occurs.SAXException
- Creating the instance failed, because the request could not be parsed.
-
writeRequest
protected abstract void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws XmlRpcException, IOException, SAXException - Throws:
XmlRpcException
IOException
SAXException
-
sendRequest
Description copied from interface:XmlRpcTransport
Send an XML-RPC message. This method is called to send a message to the other party.- Parameters:
pRequest
- The request being performed.- Returns:
- Result object, if invoking the remote method was successfull.
- Throws:
XmlRpcException
- Performing the request failed.
-
newXMLReader
- Throws:
XmlRpcException
-
readResponse
protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException - Throws:
XmlRpcException
-