org.apache.xmlrpc.server

Class XmlRpcStreamServer

public abstract class XmlRpcStreamServer extends XmlRpcServer implements XmlRpcStreamRequestProcessor

Extension of {@link XmlRpcServer} with support for reading requests from a stream and writing the response to another stream.
Method Summary
voidexecute(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection)
Returns, whether the /** Processes a "connection".
protected InputStreamgetInputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection)
protected OutputStreamgetOutputStream(ServerStreamConnection pConnection, XmlRpcStreamRequestConfig pConfig, OutputStream pStream)
Called to prepare the output stream.
protected OutputStreamgetOutputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection, int pSize)
Called to prepare the output stream, if content length is required.
protected XmlRpcRequestgetRequest(XmlRpcStreamRequestConfig pConfig, InputStream pStream)
protected XmlRpcWritergetXmlRpcWriter(XmlRpcStreamRequestConfig pConfig, OutputStream pStream)
XmlWriterFactorygetXMLWriterFactory()
Returns the XML Writer factory.
protected booleanisContentLengthRequired(XmlRpcStreamRequestConfig pConfig)
Returns, whether the requests content length is required.
voidsetXMLWriterFactory(XmlWriterFactory pFactory)
Sets the XML Writer factory.
protected voidwriteError(XmlRpcStreamRequestConfig pConfig, OutputStream pStream, Throwable pError)
protected voidwriteResponse(XmlRpcStreamRequestConfig pConfig, OutputStream pStream, Object pResult)

Method Detail

execute

public void execute(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection)
Returns, whether the /** Processes a "connection". The "connection" is an opaque object, which is being handled by the subclasses.

Parameters: pConfig The request configuration. pConnection The "connection" being processed.

Throws: XmlRpcException Processing the request failed.

getInputStream

protected InputStream getInputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection)

getOutputStream

protected OutputStream getOutputStream(ServerStreamConnection pConnection, XmlRpcStreamRequestConfig pConfig, OutputStream pStream)
Called to prepare the output stream. Typically used for enabling compression, or similar filters.

getOutputStream

protected OutputStream getOutputStream(XmlRpcStreamRequestConfig pConfig, ServerStreamConnection pConnection, int pSize)
Called to prepare the output stream, if content length is required.

getRequest

protected XmlRpcRequest getRequest(XmlRpcStreamRequestConfig pConfig, InputStream pStream)

getXmlRpcWriter

protected XmlRpcWriter getXmlRpcWriter(XmlRpcStreamRequestConfig pConfig, OutputStream pStream)

getXMLWriterFactory

public XmlWriterFactory getXMLWriterFactory()
Returns the XML Writer factory.

Returns: The XML Writer factory.

isContentLengthRequired

protected boolean isContentLengthRequired(XmlRpcStreamRequestConfig pConfig)
Returns, whether the requests content length is required.

setXMLWriterFactory

public void setXMLWriterFactory(XmlWriterFactory pFactory)
Sets the XML Writer factory.

Parameters: pFactory The XML Writer factory.

writeError

protected void writeError(XmlRpcStreamRequestConfig pConfig, OutputStream pStream, Throwable pError)

writeResponse

protected void writeResponse(XmlRpcStreamRequestConfig pConfig, OutputStream pStream, Object pResult)
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.