Package org.apache.xmlrpc.client
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 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
FieldsModifier and TypeFieldDescriptionprivate XmlRpcHttpClientConfig
private final Map
private String
private String
private InputStream
private OutputStream
private int
private boolean
private Socket
private boolean
private String
private static final String
Fields inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
USER_AGENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close()
Closes the connection and ensures, that all resources are being released.protected InputStream
Returns the input stream, from which the response is being read.private OutputStream
protected boolean
Returns, whether the response is gzip compressed.protected boolean
protected Socket
private void
sendHeader
(OutputStream pOut, String pKey, String pValue) sendRequest
(XmlRpcRequest pRequest) Send an XML-RPC message.private void
protected void
setRequestHeader
(String pHeader, String pValue) private byte[]
toHTTPBytes
(String pValue) protected void
Methods inherited from class org.apache.xmlrpc.client.XmlRpcHttpTransport
getUserAgent, initHttpHeaders, newReqWriter, setCompressionHeaders, setContentLength, setCredentials
Methods inherited from class org.apache.xmlrpc.client.XmlRpcStreamTransport
isCompressingRequest, newXMLReader, readResponse
Methods inherited from class org.apache.xmlrpc.client.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:XmlRpcTransport
Send an XML-RPC message. This method is called to send a message to the other party.- Specified by:
sendRequest
in interfaceXmlRpcTransport
- Overrides:
sendRequest
in 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:
setRequestHeader
in classXmlRpcHttpTransport
-
close
Description copied from class:XmlRpcStreamTransport
Closes the connection and ensures, that all resources are being released.- Specified by:
close
in classXmlRpcStreamTransport
- Throws:
XmlRpcClientException
-
getOutputStream
- Throws:
XmlRpcException
-
newSocket
protected Socket newSocket(boolean pSSL, String pHostName, int pPort) throws UnknownHostException, IOException - Throws:
UnknownHostException
IOException
-
toHTTPBytes
- Throws:
UnsupportedEncodingException
-
sendHeader
- Throws:
IOException
-
sendRequestHeaders
- Throws:
IOException
-
isResponseGzipCompressed
Description copied from class:XmlRpcStreamTransport
Returns, whether the response is gzip compressed.- Specified by:
isResponseGzipCompressed
in classXmlRpcStreamTransport
- Parameters:
pConfig
- The clients configuration.- Returns:
- Whether the response stream is gzip compressed.
-
getInputStream
Description copied from class:XmlRpcStreamTransport
Returns the input stream, from which the response is being read.- Specified by:
getInputStream
in classXmlRpcStreamTransport
- Throws:
XmlRpcException
-
isUsingByteArrayOutput
- Overrides:
isUsingByteArrayOutput
in classXmlRpcHttpTransport
-
writeRequest
protected void writeRequest(XmlRpcStreamTransport.ReqWriter pWriter) throws XmlRpcException, IOException, SAXException - Specified by:
writeRequest
in classXmlRpcStreamTransport
- Throws:
XmlRpcException
IOException
SAXException
-