org.apache.xmlrpc.client
Class XmlRpcLocalStreamTransport

java.lang.Object
  extended by org.apache.xmlrpc.client.XmlRpcTransportImpl
      extended by org.apache.xmlrpc.client.XmlRpcStreamTransport
          extended by 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.


Constructor Summary
XmlRpcLocalStreamTransport(XmlRpcClient pClient)
          Creates a new instance.
 
Method Summary
protected  void closeConnection(java.lang.Object pConnection)
          Closes the connection object.
protected  boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection)
          Returns, whether the response is gzip compressed.
protected  java.lang.Object newConnection(XmlRpcStreamRequestConfig pConfig)
          Creates the connection object.
protected  java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection)
          Creates a new input stream for reading the response.
protected  java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection, byte[] pContent)
          Creates a new input stream for reading the response.
protected  java.io.OutputStream newOutputStream(XmlRpcStreamRequestConfig pConfig, java.lang.Object pConnection)
          Creates a new output stream, to which the request may be written.
 
Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
closeInputStream, closeOutputStream, getInputStream, getOutputStream, initConnection, isUsingByteArrayOutput, newXMLReader, readResponse, sendRequest, writeRequest
 
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

XmlRpcLocalStreamTransport

public XmlRpcLocalStreamTransport(XmlRpcClient pClient)
Creates a new instance.

Parameters:
pClient - The client, which is controlling the transport.
Method Detail

newConnection

protected java.lang.Object newConnection(XmlRpcStreamRequestConfig pConfig)
                                  throws XmlRpcClientException
Description copied from class: XmlRpcStreamTransport
Creates the connection object. The connection object is a factory for output and input stream.

Specified by:
newConnection in class XmlRpcStreamTransport
Throws:
XmlRpcClientException

closeConnection

protected void closeConnection(java.lang.Object pConnection)
                        throws XmlRpcClientException
Description copied from class: XmlRpcStreamTransport
Closes the connection object.

Specified by:
closeConnection in class XmlRpcStreamTransport
Throws:
XmlRpcClientException

newOutputStream

protected java.io.OutputStream newOutputStream(XmlRpcStreamRequestConfig pConfig,
                                               java.lang.Object pConnection)
                                        throws XmlRpcClientException
Description copied from class: XmlRpcStreamTransport
Creates a new output stream, to which the request may be written.

Specified by:
newOutputStream in class XmlRpcStreamTransport
Parameters:
pConfig - Client configuration.
pConnection - Connection being used to send request data.
Returns:
Opened output stream.
Throws:
XmlRpcClientException - An error occurred on the client.

newInputStream

protected java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig,
                                             java.lang.Object pConnection)
                                      throws XmlRpcException
Description copied from class: XmlRpcStreamTransport
Creates a new input stream for reading the response.

Specified by:
newInputStream in class XmlRpcStreamTransport
Parameters:
pConfig - The clients configuration.
pConnection - The connection object.
Returns:
Opened input stream for reading data.
Throws:
XmlRpcException - Creating the input stream failed.

isResponseGzipCompressed

protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig,
                                           java.lang.Object pConnection)
Description copied from class: XmlRpcStreamTransport
Returns, whether the response is gzip compressed.

Specified by:
isResponseGzipCompressed in class XmlRpcStreamTransport
Parameters:
pConfig - The clients configuration.
pConnection - The connection object.
Returns:
Whether the response stream is gzip compressed.

newInputStream

protected java.io.InputStream newInputStream(XmlRpcStreamRequestConfig pConfig,
                                             java.lang.Object pConnection,
                                             byte[] pContent)
                                      throws XmlRpcException
Description copied from class: XmlRpcStreamTransport
Creates a new input stream for reading the response.

Specified by:
newInputStream in class XmlRpcStreamTransport
Parameters:
pConfig - The clients configuration.
pConnection - The connection object.
pContent - A byte array with the response.
Returns:
Opened input stream for reading data.
Throws:
XmlRpcException - Creating the input stream failed.


Copyright 2001-2001-2006 Apache Software Foundation. All Rights Reserved.