org.opennms.netmgt.xmlrpcd
Class TimeoutSecureXmlRpcTransport

java.lang.Object
  extended by org.apache.xmlrpc.DefaultXmlRpcTransport
      extended by org.opennms.netmgt.xmlrpcd.TimeoutSecureXmlRpcTransport
All Implemented Interfaces:
org.apache.xmlrpc.XmlRpcTransport

public class TimeoutSecureXmlRpcTransport
extends org.apache.xmlrpc.DefaultXmlRpcTransport

TimeoutSecureXmlRpcTransport adds a read timeout to the url connection.


Field Summary
protected  int timeout
           
 
Fields inherited from class org.apache.xmlrpc.DefaultXmlRpcTransport
auth, con, url
 
Constructor Summary
TimeoutSecureXmlRpcTransport(URL url, int timeout)
          Create a new DefaultXmlRpcTransport with the specified URL.
TimeoutSecureXmlRpcTransport(URL url, String auth, int timeout)
          Deprecated. Use setBasicAuthentication instead of passing an encoded authentication String.
 
Method Summary
 InputStream sendXmlRpc(byte[] request)
          Sends the actual XMLRPC request.
 
Methods inherited from class org.apache.xmlrpc.DefaultXmlRpcTransport
endClientRequest, setBasicAuthentication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeout

protected int timeout
Constructor Detail

TimeoutSecureXmlRpcTransport

public TimeoutSecureXmlRpcTransport(URL url,
                                    String auth,
                                    int timeout)
Deprecated. Use setBasicAuthentication instead of passing an encoded authentication String.

Create a new TimeoutSecureXmlRpcTransport 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.

TimeoutSecureXmlRpcTransport

public TimeoutSecureXmlRpcTransport(URL url,
                                    int timeout)
Create a new DefaultXmlRpcTransport with the specified URL.

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

sendXmlRpc

public InputStream sendXmlRpc(byte[] request)
                       throws IOException
Sends the actual XMLRPC request. Taken from org.apache.xmlrpc.DefaultXmlRpcTransport with a socket timeout added.

Specified by:
sendXmlRpc in interface org.apache.xmlrpc.XmlRpcTransport
Overrides:
sendXmlRpc in class org.apache.xmlrpc.DefaultXmlRpcTransport
Throws:
IOException


Copyright © 2009. All Rights Reserved.