oglueck 2003/11/10 06:33:13
Modified: httpclient API_CHANGES_2_1.txt
httpclient/src/java/org/apache/commons/httpclient/protocol
Protocol.java
Log:
re-include old constructor signature for
backwards API compatibility
Revision Changes Path
1.5 +1 -1 jakarta-commons/httpclient/API_CHANGES_2_1.txt
Index: API_CHANGES_2_1.txt
===================================================================
RCS file: /home/cvs/jakarta-commons/httpclient/API_CHANGES_2_1.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- API_CHANGES_2_1.txt 7 Nov 2003 07:34:34 -0000 1.4
+++ API_CHANGES_2_1.txt 10 Nov 2003 14:33:13 -0000 1.5
@@ -32,4 +32,4 @@
- createDigest(String, String)
- createDigestHeader(String, String)
-* There is only one Protocol constructor for both secure and insecure socket
factories.
+* Deprecated extra Protocol constructor
1.7 +20 -4
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol/Protocol.java
Index: Protocol.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol/Protocol.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Protocol.java 7 Nov 2003 07:34:34 -0000 1.6
+++ Protocol.java 10 Nov 2003 14:33:13 -0000 1.7
@@ -194,7 +194,7 @@
private boolean secure;
/**
- * Constructs a new Protocol. If the created protocol is secure depends on
+ * Constructs a new Protocol. Whether the created protocol is secure depends on
* the class of <code>factory</code>.
*
* @param scheme the scheme (e.g. http, https)
@@ -219,6 +219,22 @@
this.defaultPort = defaultPort;
this.secure = (factory instanceof SecureProtocolSocketFactory);
}
+
+ /**
+ * Constructs a new Protocol. Whether the created protocol is secure depends on
+ * the class of <code>factory</code>.
+ *
+ * @param scheme the scheme (e.g. http, https)
+ * @param factory the factory for creating sockets for communication using
+ * this protocol
+ * @param defaultPort the port this protocol defaults to
+ * @deprecated Use the constructor that uses ProtocolSocketFactory, this
version of
+ * the constructor is only kept for backwards API compatibility.
+ */
+ public Protocol(String scheme,
+ SecureProtocolSocketFactory factory, int defaultPort) {
+ this(scheme, (ProtocolSocketFactory) factory, defaultPort);
+ }
/**
* Returns the defaultPort.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]