org.apache.xmlrpc

Class LiteXmlRpcTransport

class LiteXmlRpcTransport extends Object implements XmlRpcTransport

Interface from XML-RPC to a 'lite' HTTP implementation. This class will use the XmlRpcClientLite.auth member for the HTTP Basic authentication string.

Since: 1.2

Version: $Id: LiteXmlRpcTransport.java 233919 2005-04-22 10:26:17Z hgomez $

Author: Hannes Wallnoefer Andrew Evers

Field Summary
protected Stringauth
byte[]buffer
Stringhost
Stringhostname
BufferedInputStreaminput
booleankeepalive
BufferedOutputStreamoutput
intport
Socketsocket
Stringuri
Constructor Summary
LiteXmlRpcTransport(URL url)
Create a new DefaultXmlRpcTransport with the specified URL.
Method Summary
protected voidcloseConnection()
voidendClientRequest()
protected voidfinalize()
protected voidinitConnection()
StringreadLine()
InputStreamsendRequest(byte[] request)
InputStreamsendXmlRpc(byte[] request)
voidsetBasicAuthentication(String user, String password)
Sets Authentication for this client.

Field Detail

auth

protected String auth

buffer

byte[] buffer

host

String host

hostname

String hostname

input

BufferedInputStream input

keepalive

boolean keepalive

output

BufferedOutputStream output

port

int port

socket

Socket socket

uri

String uri

Constructor Detail

LiteXmlRpcTransport

public LiteXmlRpcTransport(URL url)
Create a new DefaultXmlRpcTransport with the specified URL.

Parameters: url the url to POST XML-RPC requests to.

Method Detail

closeConnection

protected void closeConnection()

endClientRequest

public void endClientRequest()

finalize

protected void finalize()

Throws: Throwable

initConnection

protected void initConnection()

Throws: IOException

readLine

private String readLine()

Returns:

Throws: IOException

sendRequest

public InputStream sendRequest(byte[] request)

Parameters: request

Returns:

Throws: IOException

sendXmlRpc

public InputStream sendXmlRpc(byte[] request)

setBasicAuthentication

public void setBasicAuthentication(String user, String password)
Sets Authentication for this client. This will be sent as Basic Authentication header to the server as described in http://www.ietf.org/rfc/rfc2617.txt.
Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.