org.apache.xmlrpc

Class DefaultXmlRpcTransport

Implemented Interfaces:
XmlRpcTransport

public class DefaultXmlRpcTransport
extends java.lang.Object
implements XmlRpcTransport

Interface from XML-RPC to the default HTTP transport based on the
Version:
$Id: DefaultXmlRpcTransport.java 233919 2005-04-22 10:26:17Z hgomez $
Authors:
Hannes Wallnoefer
Andrew Evers
Ryan Hoegg
Since:
1.2
See Also:
class.

Field Summary

protected String
auth
protected URLConnection
con
protected URL
url

Constructor Summary

DefaultXmlRpcTransport(URL url)
Create a new DefaultXmlRpcTransport with the specified URL.
DefaultXmlRpcTransport(URL url, String auth)
Deprecated. Use setBasicAuthentication instead of passing an encoded authentication String.

Method Summary

void
endClientRequest()
End an XML-RPC request.
InputStream
sendXmlRpc(byte[] request)
Send an XML-RPC message.
void
setBasicAuthentication(String user, String password)
Sets Authentication for this client.

Field Details

auth

protected String auth

con

protected URLConnection con

url

protected URL url

Constructor Details

DefaultXmlRpcTransport

public DefaultXmlRpcTransport(URL url)
Create a new DefaultXmlRpcTransport with the specified URL.
Parameters:
url - the url to POST XML-RPC requests to.

DefaultXmlRpcTransport

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

Method Details

endClientRequest

public void endClientRequest()
            throws XmlRpcClientException
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.

sendXmlRpc

public InputStream sendXmlRpc(byte[] request)
            throws IOException
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.

setBasicAuthentication

public void setBasicAuthentication(String user,
                                   String password)

Copyright B) 1999-2002 Apache Software Foundation. All Rights Reserved.