org.apache.xmlrpc

Class CommonsXmlRpcTransportFactory

Implemented Interfaces:
XmlRpcTransportFactory

public class CommonsXmlRpcTransportFactory
extends java.lang.Object
implements XmlRpcTransportFactory

A transport factory, which uses the Jakarta Commons HttpClient.

Field Summary

private String
auth
private Integer
connectionTimeout
private Integer
timeout
private URL
url

Fields inherited from interface org.apache.xmlrpc.XmlRpcTransportFactory

CONSTRUCTOR_SIGNATURE, CONSTRUCTOR_SIGNATURE_STRING, TRANSPORT_AUTH, TRANSPORT_URL

Constructor Summary

CommonsXmlRpcTransportFactory(URL pURL)
Creates a new instance with the given server URL.

Method Summary

XmlRpcTransport
createTransport()
void
setBasicAuthentication(String pAuth)
Sets Authentication for this client.
void
setBasicAuthentication(String pUsername, String pPassword)
Sets Authentication for this client.
void
setConnectionTimeout(int newConnectionTimeoutInMilliSeconds)
Sets the timeout until a connection is etablished.
void
setProperty(String propertyName, Object value)
void
setTimeout(int newTimeoutInMilliSeconds)
Sets the socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data.

Field Details

auth

private String auth

connectionTimeout

private Integer connectionTimeout

timeout

private Integer timeout

url

private URL url

Constructor Details

CommonsXmlRpcTransportFactory

public CommonsXmlRpcTransportFactory(URL pURL)
Creates a new instance with the given server URL.

Method Details

createTransport

public XmlRpcTransport createTransport()
            throws XmlRpcClientException
Specified by:
createTransport in interface XmlRpcTransportFactory

setBasicAuthentication

public void setBasicAuthentication(String pAuth)

setBasicAuthentication

public void setBasicAuthentication(String pUsername,
                                   String pPassword)

setConnectionTimeout

public void setConnectionTimeout(int newConnectionTimeoutInMilliSeconds)
Sets the timeout until a connection is etablished. A timeout value of zero \ means the timeout is not used. The default value is zero.
Parameters:
newConnectionTimeoutInMilliSeconds - timeout in milliseconds (ms)
See Also:
org.apache.commons.httpclient.HttpClient.setConnectionTimeout

setProperty

public void setProperty(String propertyName,
                        Object value)
Specified by:
setProperty in interface XmlRpcTransportFactory

setTimeout

public void setTimeout(int newTimeoutInMilliSeconds)
Sets the socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout.
Parameters:
newTimeoutInMilliSeconds - timeout in milliseconds (ms)
See Also:
org.apache.commons.httpclient.HttpClient.setTimeout

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