org.apache.xmlrpc.client

Class XmlRpcLiteHttpTransport

Implemented Interfaces:
XmlRpcTransport

public class XmlRpcLiteHttpTransport
extends XmlRpcHttpTransport

A "light" HTTP transport implementation.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport

XmlRpcHttpTransport.ByteArrayReqWriter

Nested classes/interfaces inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport

XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl

Field Summary

Fields inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport

USER_AGENT

Constructor Summary

XmlRpcLiteHttpTransport(XmlRpcClient pClient)
Creates a new instance.

Method Summary

protected void
close()
Closes the connection and ensures, that all resources are being released.
protected InputStream
getInputStream()
Returns the input stream, from which the response is being read.
protected boolean
isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
Returns, whether the response is gzip compressed.
protected boolean
isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig)
protected Socket
newSocket(String pHostName, int pPort)
Object
sendRequest(XmlRpcRequest pRequest)
Send an XML-RPC message.
protected void
setRequestHeader(String pHeader, String pValue)
protected void
writeRequest(XmlRpcStreamTransport.ReqWriter pWriter)

Methods inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport

getUserAgent, initHttpHeaders, isUsingByteArrayOutput, newReqWriter, sendRequest, setCompressionHeaders, setContentLength, setCredentials, setRequestHeader

Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport

close, getInputStream, isCompressingRequest, isResponseGzipCompressed, newReqWriter, newXMLReader, readResponse, sendRequest, writeRequest

Methods inherited from class org.apache.xmlrpc.client.XmlRpcTransportImpl

getClient

Constructor Details

XmlRpcLiteHttpTransport

public XmlRpcLiteHttpTransport(XmlRpcClient pClient)
Creates a new instance.
Parameters:
pClient - The client controlling this instance.

Method Details

close

protected void close()
            throws XmlRpcClientException
Closes the connection and ensures, that all resources are being released.
Overrides:
close in interface XmlRpcStreamTransport

getInputStream

protected InputStream getInputStream()
            throws XmlRpcException
Returns the input stream, from which the response is being read.
Overrides:
getInputStream in interface XmlRpcStreamTransport

isResponseGzipCompressed

protected boolean isResponseGzipCompressed(XmlRpcStreamRequestConfig pConfig)
Returns, whether the response is gzip compressed.
Overrides:
isResponseGzipCompressed in interface XmlRpcStreamTransport
Parameters:
pConfig - The clients configuration.
Returns:
Whether the response stream is gzip compressed.

isUsingByteArrayOutput

protected boolean isUsingByteArrayOutput(XmlRpcHttpClientConfig pConfig)
Overrides:
isUsingByteArrayOutput in interface XmlRpcHttpTransport

newSocket

protected Socket newSocket(String pHostName,
                           int pPort)
            throws UnknownHostException,
                   IOException

sendRequest

public Object sendRequest(XmlRpcRequest pRequest)
            throws XmlRpcException
Send an XML-RPC message. This method is called to send a message to the other party.
Specified by:
sendRequest in interface XmlRpcTransport
Overrides:
sendRequest in interface XmlRpcHttpTransport
Parameters:
pRequest - The request being performed.
Returns:
Result object, if invoking the remote method was successfull.
Throws:
XmlRpcException - Performing the request failed.

setRequestHeader

protected void setRequestHeader(String pHeader,
                                String pValue)
Overrides:
setRequestHeader in interface XmlRpcHttpTransport

writeRequest

protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter)
            throws XmlRpcException,
                   IOException,
                   SAXException
Overrides:
writeRequest in interface XmlRpcStreamTransport

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.