Class XmlRpcLiteHttpTransport
java.lang.Object
org.apache.xmlrpc.client.XmlRpcTransportImpl
org.apache.xmlrpc.client.XmlRpcStreamTransport
org.apache.xmlrpc.client.XmlRpcHttpTransport
org.apache.xmlrpc.client.XmlRpcLiteHttpTransport
- All Implemented Interfaces:
XmlRpcTransport
- Direct Known Subclasses:
XmlRpcLite14HttpTransport
A "light" HTTP transport implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class XmlRpcHttpTransport
XmlRpcHttpTransport.ByteArrayReqWriterNested classes/interfaces inherited from class XmlRpcStreamTransport
XmlRpcStreamTransport.GzipReqWriter, XmlRpcStreamTransport.ReqWriter, XmlRpcStreamTransport.ReqWriterImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate XmlRpcHttpClientConfigprivate final Mapprivate Stringprivate Stringprivate InputStreamprivate OutputStreamprivate intprivate booleanprivate Socketprivate booleanprivate Stringprivate static final StringFields inherited from class XmlRpcHttpTransport
USER_AGENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclose()Closes the connection and ensures, that all resources are being released.protected InputStreamReturns the input stream, from which the response is being read.private OutputStreamprotected booleanReturns, whether the response is gzip compressed.protected booleanprotected Socketprivate voidsendHeader(OutputStream pOut, String pKey, String pValue) sendRequest(XmlRpcRequest pRequest) Send an XML-RPC message.private voidprotected voidsetRequestHeader(String pHeader, String pValue) private byte[]toHTTPBytes(String pValue) protected voidMethods inherited from class XmlRpcHttpTransport
getUserAgent, initHttpHeaders, newReqWriter, setCompressionHeaders, setContentLength, setCredentialsMethods inherited from class XmlRpcStreamTransport
isCompressingRequest, newXMLReader, readResponseMethods inherited from class XmlRpcTransportImpl
getClient
-
Field Details
-
userAgent
-
ssl
private boolean ssl -
hostname
-
host
-
port
private int port -
uri
-
socket
-
output
-
input
-
headers
-
responseGzipCompressed
private boolean responseGzipCompressed -
config
-
-
Constructor Details
-
XmlRpcLiteHttpTransport
Creates a new instance.- Parameters:
pClient- The client controlling this instance.
-
-
Method Details
-
sendRequest
Description copied from interface:XmlRpcTransportSend an XML-RPC message. This method is called to send a message to the other party.- Specified by:
sendRequestin interfaceXmlRpcTransport- Overrides:
sendRequestin classXmlRpcHttpTransport- Parameters:
pRequest- The request being performed.- Returns:
- Result object, if invoking the remote method was successfull.
- Throws:
XmlRpcException- Performing the request failed.
-
setRequestHeader
- Specified by:
setRequestHeaderin classXmlRpcHttpTransport
-
close
Description copied from class:XmlRpcStreamTransportCloses the connection and ensures, that all resources are being released.- Specified by:
closein classXmlRpcStreamTransport- Throws:
XmlRpcClientException
-
getOutputStream
- Throws:
XmlRpcException
-
newSocket
protected Socket newSocket(boolean pSSL, String pHostName, int pPort) throws UnknownHostException, IOException - Throws:
UnknownHostExceptionIOException
-
toHTTPBytes
- Throws:
UnsupportedEncodingException
-
sendHeader
- Throws:
IOException
-
sendRequestHeaders
- Throws:
IOException
-
isResponseGzipCompressed
Description copied from class:XmlRpcStreamTransportReturns, whether the response is gzip compressed.- Specified by:
isResponseGzipCompressedin classXmlRpcStreamTransport- Parameters:
pConfig- The clients configuration.- Returns:
- Whether the response stream is gzip compressed.
-
getInputStream
Description copied from class:XmlRpcStreamTransportReturns the input stream, from which the response is being read.- Specified by:
getInputStreamin classXmlRpcStreamTransport- Throws:
XmlRpcException
-
isUsingByteArrayOutput
- Overrides:
isUsingByteArrayOutputin classXmlRpcHttpTransport
-
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws XmlRpcException, IOException, SAXException - Specified by:
writeRequestin classXmlRpcStreamTransport- Throws:
XmlRpcExceptionIOExceptionSAXException
-