org.apache.xmlrpc
Class LiteXmlRpcTransport

java.lang.Object
  extended by org.apache.xmlrpc.LiteXmlRpcTransport
All Implemented Interfaces:
XmlRpcTransport

 class LiteXmlRpcTransport
extends java.lang.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  java.lang.String auth
           
(package private)  byte[] buffer
           
(package private)  java.lang.String host
           
(package private)  java.lang.String hostname
           
(package private)  java.io.BufferedInputStream input
           
(package private)  boolean keepalive
           
(package private)  java.io.BufferedOutputStream output
           
(package private)  int port
           
(package private)  java.net.Socket socket
           
(package private)  java.lang.String uri
           
 
Constructor Summary
LiteXmlRpcTransport(java.net.URL url)
          Create a new DefaultXmlRpcTransport with the specified URL.
 
Method Summary
protected  void closeConnection()
           
 void endClientRequest()
          End an XML-RPC request.
protected  void finalize()
           
protected  void initConnection()
           
 java.io.InputStream sendRequest(byte[] request)
           
 java.io.InputStream sendXmlRpc(byte[] request)
          Send an XML-RPC message.
 void setBasicAuthentication(java.lang.String user, java.lang.String password)
          Sets Authentication for this client.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hostname

java.lang.String hostname

host

java.lang.String host

auth

protected java.lang.String auth

port

int port

uri

java.lang.String uri

socket

java.net.Socket socket

output

java.io.BufferedOutputStream output

input

java.io.BufferedInputStream input

keepalive

boolean keepalive

buffer

byte[] buffer
Constructor Detail

LiteXmlRpcTransport

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

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

sendXmlRpc

public java.io.InputStream sendXmlRpc(byte[] request)
                               throws java.io.IOException
Description copied from interface: XmlRpcTransport
Send an XML-RPC message. This method is called to send a message to the other party.

Specified by:
sendXmlRpc in interface XmlRpcTransport
Parameters:
request - the request in network encoding.
Throws:
java.io.IOException - if an IOException occurs in the IO level of the transport.

initConnection

protected void initConnection()
                       throws java.io.IOException
Throws:
java.io.IOException

closeConnection

protected void closeConnection()

sendRequest

public java.io.InputStream sendRequest(byte[] request)
                                throws java.io.IOException
Parameters:
request -
Returns:
Throws:
java.io.IOException

setBasicAuthentication

public void setBasicAuthentication(java.lang.String user,
                                   java.lang.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.


endClientRequest

public void endClientRequest()
Description copied from interface: XmlRpcTransport
End an XML-RPC request. This method is called by the XmlRpcClient when then request has been sent and the response (or an exception) recieved.

Specified by:
endClientRequest in interface XmlRpcTransport

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright 2001-2001-2005 Apache Software Foundation. All Rights Reserved.