aboutsummaryrefslogtreecommitdiff
path: root/id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java
diff options
context:
space:
mode:
Diffstat (limited to 'id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java')
-rw-r--r--id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java36
1 files changed, 23 insertions, 13 deletions
diff --git a/id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java b/id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java
index 8039b67a6..731212ef8 100644
--- a/id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java
+++ b/id.server/src/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java
@@ -2,7 +2,7 @@ package at.gv.egovernment.moa.id.proxy;
import java.io.IOException;
import java.net.HttpURLConnection;
-import java.util.Map;
+import java.util.Vector;
import javax.net.ssl.SSLSocketFactory;
import javax.servlet.http.HttpServletRequest;
@@ -20,17 +20,17 @@ public interface ConnectionBuilder {
/**
* Builds an HttpURLConnection to a {@link java.net.URL} which is derived
* from an {@link HttpServletRequest} URL, by substitution of a
- * public URL prefix for the real URL prefix.<br>
- * The HttpURLConnection has been created by {@link java.net.URL#openConnection}, but
- * it has not yet been connected to by {@link java.net.URLConnection#connect}.<br>
- * The field settings of the HttpURLConnection are:
- * <ul>
- * <li><code>allowUserInteraction = false</code></li>
- * <li><code>doInput = true</code></li>
- * <li><code>doOutput = true</code></li>
- * <li><code>requestMethod = request.getMethod()</code></li>
- * <li><code>useCaches = false</code></li>
- * </ul>
+ * public URL prefix for the real URL prefix.<br>
+ * The HttpURLConnection has been created by {@link java.net.URL#openConnection}, but
+ * it has not yet been connected to by {@link java.net.URLConnection#connect}.<br>
+ * The field settings of the HttpURLConnection are:
+ * <ul>
+ * <li><code>allowUserInteraction = false</code></li>
+ * <li><code>doInput = true</code></li>
+ * <li><code>doOutput = true</code></li>
+ * <li><code>requestMethod = request.getMethod()</code></li>
+ * <li><code>useCaches = false</code></li>
+ * </ul>
*
* @param request the incoming request which shall be forwarded
* @param publicURLPrefix the public URL prefix to be substituted by the real URL prefix
@@ -50,5 +50,15 @@ public interface ConnectionBuilder {
String publicURLPrefix,
String realURLPrefix,
SSLSocketFactory sslSocketFactory,
- Map parameters) throws IOException;
+ Vector parameters) throws IOException;
+
+
+ /**
+ * Disconnects the HttpURLConnection if necessary.
+ * The implementation of the Connectionbuilder decides wether
+ * if this should be happen or not.
+ *
+ * @param con the HttpURLConnection which is normaly to be closed
+ */
+ public void disconnect(HttpURLConnection con);
}