org.apache.xmlrpc
Class CommonsXmlRpcTransportFactory

java.lang.Object
  extended by org.apache.xmlrpc.CommonsXmlRpcTransportFactory
All Implemented Interfaces:
XmlRpcTransportFactory

public class CommonsXmlRpcTransportFactory
extends java.lang.Object
implements XmlRpcTransportFactory

A transport factory, which uses the Jakarta Commons HttpClient.


Field Summary
 
Fields inherited from interface org.apache.xmlrpc.XmlRpcTransportFactory
CONSTRUCTOR_SIGNATURE, CONSTRUCTOR_SIGNATURE_STRING, TRANSPORT_AUTH, TRANSPORT_URL
 
Constructor Summary
CommonsXmlRpcTransportFactory(java.net.URL pURL)
          Creates a new instance with the given server URL.
 
Method Summary
 XmlRpcTransport createTransport()
          Create a new XML-RPC transport.
 void setBasicAuthentication(java.lang.String pAuth)
          Sets Authentication for this client.
 void setBasicAuthentication(java.lang.String pUsername, java.lang.String pPassword)
          Sets Authentication for this client.
 void setConnectionTimeout(int newConnectionTimeoutInMilliSeconds)
          Sets the timeout until a connection is etablished.
 void setProperty(java.lang.String propertyName, java.lang.Object value)
          Set a property for all newly created transports.
 void setTimeout(int newTimeoutInMilliSeconds)
          Sets the socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonsXmlRpcTransportFactory

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

Method Detail

createTransport

public XmlRpcTransport createTransport()
                                throws XmlRpcClientException
Description copied from interface: XmlRpcTransportFactory
Create a new XML-RPC transport.

Specified by:
createTransport in interface XmlRpcTransportFactory
Returns:
XmlRpcTransport an instance created according to the rules specified to the constructor.
Throws:
XmlRpcClientException

setBasicAuthentication

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


setBasicAuthentication

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


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:
HttpClient.setTimeout(int)

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:
HttpClient.setConnectionTimeout(int)

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object value)
Description copied from interface: XmlRpcTransportFactory
Set a property for all newly created transports.

Specified by:
setProperty in interface XmlRpcTransportFactory
Parameters:
propertyName - the property to set.
value - the value to set it to.


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