ws-xmlrpc-auto mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joc...@apache.org
Subject svn commit: r434521 - in /webservices/xmlrpc/trunk: client/src/main/java/org/apache/xmlrpc/client/XmlRpcLiteHttpTransport.java pom.xml src/changes/changes.xml
Date Thu, 24 Aug 2006 20:44:17 GMT
Author: jochen
Date: Thu Aug 24 13:44:17 2006
New Revision: 434521

URL: http://svn.apache.org/viewvc?rev=434521&view=rev
Log:
The XmlRpcLiteHttpTransport is now creating sockets in a protected
method. This allows to switch to alternative socket implementations.
Submitted-by: Catalin Hritcu, Catalin.Hritcu@gmail.com
PR: XMLRPC-107

Modified:
    webservices/xmlrpc/trunk/client/src/main/java/org/apache/xmlrpc/client/XmlRpcLiteHttpTransport.java
    webservices/xmlrpc/trunk/pom.xml
    webservices/xmlrpc/trunk/src/changes/changes.xml

Modified: webservices/xmlrpc/trunk/client/src/main/java/org/apache/xmlrpc/client/XmlRpcLiteHttpTransport.java
URL: http://svn.apache.org/viewvc/webservices/xmlrpc/trunk/client/src/main/java/org/apache/xmlrpc/client/XmlRpcLiteHttpTransport.java?rev=434521&r1=434520&r2=434521&view=diff
==============================================================================
--- webservices/xmlrpc/trunk/client/src/main/java/org/apache/xmlrpc/client/XmlRpcLiteHttpTransport.java
(original)
+++ webservices/xmlrpc/trunk/client/src/main/java/org/apache/xmlrpc/client/XmlRpcLiteHttpTransport.java
Thu Aug 24 13:44:17 2006
@@ -24,6 +24,7 @@
 import java.net.ConnectException;
 import java.net.Socket;
 import java.net.URL;
+import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -130,7 +131,7 @@
 	
 			for (int tries = 0;  ;  tries++) {
 				try {
-					socket = new Socket(hostname, port);
+					socket = newSocket();
 					output = new BufferedOutputStream(socket.getOutputStream()){
 						/** Closing the output stream would close the whole socket, which we don't want,
 						 * because the don't want until the request is processed completely.
@@ -162,6 +163,10 @@
 					+ hostname + ":" + port + ": " + e.getMessage(), e);
 		}
 	}
+
+    protected Socket newSocket() throws UnknownHostException, IOException {
+        return new Socket(hostname, port);
+    }
 
 	private byte[] toHTTPBytes(String pValue) throws UnsupportedEncodingException {
 		return pValue.getBytes("US-ASCII");

Modified: webservices/xmlrpc/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/xmlrpc/trunk/pom.xml?rev=434521&r1=434520&r2=434521&view=diff
==============================================================================
--- webservices/xmlrpc/trunk/pom.xml (original)
+++ webservices/xmlrpc/trunk/pom.xml Thu Aug 24 13:44:17 2006
@@ -129,6 +129,10 @@
             <email>landonf@threerings.net</email>
         </contributor>
         <contributor>
+            <name>Catalin Hritcu</name>
+            <email>Catalin.Hritcu@gmail.com</email>
+        </contributor>
+        <contributor>
             <name>Brad Karp</name>
             <email>bkarp@cs.ucl.ac.uk</email>
         </contributor>

Modified: webservices/xmlrpc/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/webservices/xmlrpc/trunk/src/changes/changes.xml?rev=434521&r1=434520&r2=434521&view=diff
==============================================================================
--- webservices/xmlrpc/trunk/src/changes/changes.xml (original)
+++ webservices/xmlrpc/trunk/src/changes/changes.xml Thu Aug 24 13:44:17 2006
@@ -51,6 +51,12 @@
       <action dev="jochen" type="add">
         Added documentation on custom data types.
       </action>
+      <action dev="jochen" type="add" due-to="Catalin Hritcu"
+          due-to-email="Catalin.Hritcu@gmail.com" issue="XMLRPC-107">
+        The XmlRpcLiteHttpTransport is now creating a socket
+        in a protected methods. This allows to switch to
+        alternative socket implementations.
+      </action>
     </release>
     <release version="3.0rc1" date="27-Jul-2006">
       <action dev="jochen" type="fix" due-to="Alan Burlison"



Mime
View raw message