|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlrpc.client.XmlRpcTransportImpl
org.apache.xmlrpc.client.XmlRpcStreamTransport
public abstract class XmlRpcStreamTransport
Implementation of a transport class, which is based on an output stream for sending the request and an input stream for receiving the response,
Constructor Summary | |
---|---|
protected |
XmlRpcStreamTransport(XmlRpcClient pClient)
Creates a new instance on behalf of the given client. |
Method Summary | |
---|---|
protected abstract void |
closeConnection(java.lang.Object pConnection)
Closes the connection object. |
protected void |
closeInputStream(java.io.InputStream pStream)
Closes the opened input stream, indicating that no more data is being read. |
protected void |
closeOutputStream(java.io.OutputStream pStream)
Closes the opened output stream, indicating that no more data is being sent. |
protected java.io.InputStream |
getInputStream(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection,
byte[] pContent)
|
protected java.io.OutputStream |
getOutputStream(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection)
|
protected void |
initConnection(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection)
Initializes the newly created connection. |
protected abstract boolean |
isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection)
Returns, whether the response is gzip compressed. |
protected boolean |
isUsingByteArrayOutput(XmlRpcStreamRequestConfig pConfig)
If this method returns true, then the method newInputStream(XmlRpcStreamRequestConfig, Object, byte[])
will be invoked to create the response. |
protected abstract java.lang.Object |
newConnection(XmlRpcStreamRequestConfig pConfig)
Creates the connection object. |
protected abstract java.io.InputStream |
newInputStream(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection)
Creates a new input stream for reading the response. |
protected abstract java.io.InputStream |
newInputStream(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection,
byte[] pContent)
Creates a new input stream for reading the response. |
protected abstract java.io.OutputStream |
newOutputStream(XmlRpcStreamRequestConfig pConfig,
java.lang.Object pConnection)
Creates a new output stream, to which the request may be written. |
protected org.xml.sax.XMLReader |
newXMLReader()
|
protected java.lang.Object |
readResponse(XmlRpcStreamRequestConfig pConfig,
java.io.InputStream pStream)
|
java.lang.Object |
sendRequest(XmlRpcRequest pRequest)
Send an XML-RPC message. |
protected void |
writeRequest(XmlRpcStreamRequestConfig pConfig,
java.io.OutputStream pStream,
XmlRpcRequest pRequest)
|
Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl |
---|
getClient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected XmlRpcStreamTransport(XmlRpcClient pClient)
Method Detail |
---|
protected abstract java.lang.Object newConnection(XmlRpcStreamRequestConfig pConfig) throws XmlRpcClientException
XmlRpcClientException
protected abstract void closeConnection(java.lang.Object pConnection) throws XmlRpcClientException
XmlRpcClientException
protected void initConnection(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection) throws XmlRpcClientException
pConfig
- The clients configuration.pConnection
- The connection being initialized.
XmlRpcClientException
- A local error on the client occurred.protected abstract java.io.OutputStream newOutputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection) throws XmlRpcClientException
pConfig
- Client configuration.pConnection
- Connection being used to send request data.
XmlRpcClientException
- An error occurred on the client.protected void closeOutputStream(java.io.OutputStream pStream) throws XmlRpcClientException
pStream
- The stream being closed.
XmlRpcClientException
- An error occurred on the client.protected java.io.OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection) throws XmlRpcClientException
XmlRpcClientException
protected abstract java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection) throws XmlRpcException
pConfig
- The clients configuration.pConnection
- The connection object.
XmlRpcException
- Creating the input stream failed.protected abstract java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection, byte[] pContent) throws XmlRpcException
pConfig
- The clients configuration.pConnection
- The connection object.pContent
- A byte array with the response.
XmlRpcException
- Creating the input stream failed.protected void closeInputStream(java.io.InputStream pStream) throws XmlRpcClientException
pStream
- The stream being closed.
XmlRpcClientException
- An error occurred on the client.protected abstract boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection)
pConfig
- The clients configuration.pConnection
- The connection object.
protected java.io.InputStream getInputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection, byte[] pContent) throws XmlRpcException
XmlRpcException
protected boolean isUsingByteArrayOutput(XmlRpcStreamRequestConfig pConfig)
newInputStream(XmlRpcStreamRequestConfig, Object, byte[])
will be invoked to create the response. Otherwise, the methods
getOutputStream(XmlRpcStreamRequestConfig, Object)
, and
newInputStream(XmlRpcStreamRequestConfig, Object)
will
be used.
public java.lang.Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException
XmlRpcTransport
pRequest
- The request being performed.
XmlRpcException
- Performing the request failed.protected org.xml.sax.XMLReader newXMLReader() throws XmlRpcClientException
XmlRpcClientException
protected java.lang.Object readResponse(XmlRpcStreamRequestConfig pConfig, java.io.InputStream pStream) throws XmlRpcException
XmlRpcException
protected void writeRequest(XmlRpcStreamRequestConfig pConfig, java.io.OutputStream pStream, XmlRpcRequest pRequest) throws XmlRpcException
XmlRpcException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |