aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
authorpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-11-21 12:16:06 +0000
committerpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2007-11-21 12:16:06 +0000
commit4eb6d1fc1018a3e715ef968d2c6683e3e914dd5d (patch)
tree29f6415d682b0a0194b824998fea7584d897add8 /id/server/idserverlib/src/main/java
parentf9d791a18dfecc552152f12901b572a8c9400ce6 (diff)
downloadmoa-id-spss-4eb6d1fc1018a3e715ef968d2c6683e3e914dd5d.tar.gz
moa-id-spss-4eb6d1fc1018a3e715ef968d2c6683e3e914dd5d.tar.bz2
moa-id-spss-4eb6d1fc1018a3e715ef968d2c6683e3e914dd5d.zip
Extended to can be used with apache commons httpclient 3.1
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1048 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main/java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java
index 41a07d146..de839feba 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java
@@ -4,7 +4,10 @@ import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
+
import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.commons.httpclient.params.HttpConnectionParams;
import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
@@ -77,6 +80,32 @@ public class SZRGWSecureSocketFactory implements SecureProtocolSocketFactory {
autoClose
);
}
+
+ /**
+ * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int,java.net.InetAddress,int,org.apache.commons.httpclient.params.HttpConnectionParams)
+ */
+ public Socket createSocket(
+ String host,
+ int port,
+ InetAddress clientHost,
+ int clientPort,
+ HttpConnectionParams params)
+ throws IOException, UnknownHostException, org.apache.commons.httpclient.ConnectTimeoutException {
+
+ Socket socket = createSocket(host, port, clientHost, clientPort);
+ if (socket != null) {
+ // socket.setKeepAlive(false);
+ if (params.getReceiveBufferSize() >= 0)
+ socket.setReceiveBufferSize(params.getReceiveBufferSize());
+ if (params.getSendBufferSize() >= 0)
+ socket.setSendBufferSize(params.getSendBufferSize());
+ socket.setReuseAddress(true);
+ if (params.getSoTimeout() >= 0)
+ socket.setSoTimeout(params.getSoTimeout());
+ }
+ return socket;
+
+ }
/**
* @see java.lang.Object#equals(java.lang.Object)
@@ -91,4 +120,5 @@ public class SZRGWSecureSocketFactory implements SecureProtocolSocketFactory {
public int hashCode() {
return SZRGWSecureSocketFactory.class.hashCode();
}
+
}