org.apache.xmlrpc
Class DefaultXmlRpcTransport

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

public class DefaultXmlRpcTransport
extends java.lang.Object
implements XmlRpcTransport

Interface from XML-RPC to the default HTTP transport based on the

Since:
1.2
Version:
$Id: DefaultXmlRpcTransport.html 359531 2005-12-28 13:59:25Z jochen $
Author:
Hannes Wallnoefer, Andrew Evers, Ryan Hoegg
See Also:
class.

Field Summary
protected  java.lang.String auth
           
protected  java.net.URLConnection con
           
protected  java.net.URL url
           
 
Constructor Summary
DefaultXmlRpcTransport(java.net.URL url)
          Create a new DefaultXmlRpcTransport with the specified URL.
DefaultXmlRpcTransport(java.net.URL url, java.lang.String auth)
          Deprecated. Use setBasicAuthentication instead of passing an encoded authentication String.
 
Method Summary
 void endClientRequest()
          End an XML-RPC 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

protected java.net.URL url

auth

protected java.lang.String auth

con

protected java.net.URLConnection con
Constructor Detail

DefaultXmlRpcTransport

public DefaultXmlRpcTransport(java.net.URL url,
                              java.lang.String auth)
Deprecated. Use setBasicAuthentication instead of passing an encoded authentication String.

Create a new DefaultXmlRpcTransport with the specified URL and basic authorization string.

Parameters:
url - the url to POST XML-RPC requests to.
auth - the Base64 encoded HTTP Basic authentication value.

DefaultXmlRpcTransport

public DefaultXmlRpcTransport(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.

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()
                      throws XmlRpcClientException
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
Throws:
XmlRpcClientException - if an exception occurs in the transport.


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