[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/sslbisocket ...
Ron Sigal
ron_sigal at yahoo.com
Tue Jan 16 22:05:47 EST 2007
User: rsigal
Date: 07/01/16 22:05:47
Modified: src/main/org/jboss/remoting/transport/sslbisocket
SSLBisocketServerInvoker.java
Log:
JBREM-298: Added ability to wrap SocketFactory.
Revision Changes Path
1.3 +14 -3 JBossRemoting/src/main/org/jboss/remoting/transport/sslbisocket/SSLBisocketServerInvoker.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SSLBisocketServerInvoker.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/sslbisocket/SSLBisocketServerInvoker.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- SSLBisocketServerInvoker.java 27 Dec 2006 05:58:39 -0000 1.2
+++ SSLBisocketServerInvoker.java 17 Jan 2007 03:05:47 -0000 1.3
@@ -24,8 +24,10 @@
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.security.SSLSocketBuilder;
+import org.jboss.remoting.socketfactory.SocketFactoryWrapper;
import org.jboss.remoting.transport.bisocket.BisocketServerInvoker;
import org.jboss.remoting.transport.sslsocket.SSLSocketServerInvokerMBean;
+import org.jboss.logging.Logger;
import javax.net.ServerSocketFactory;
import javax.net.SocketFactory;
@@ -44,6 +46,8 @@
implements SSLSocketServerInvokerMBean
{
+ private static final Logger log = Logger.getLogger(SSLBisocketServerInvoker.class);
+
public SSLBisocketServerInvoker(InvokerLocator locator)
{
super(locator);
@@ -80,10 +84,10 @@
{
SocketFactory sf = super.createSocketFactory(configuration);
- if (sf != null)
- {
+ if (isCompleteSocketFactory(sf))
return sf;
- }
+
+ SocketFactory wrapper = sf;
try
{
@@ -95,9 +99,16 @@
log.error("Error creating SSL Socket Factory for client invoker.", e);
}
+ if (wrapper != null)
+ {
+ ((SocketFactoryWrapper) wrapper).setSocketFactory(sf);
+ return wrapper;
+ }
+
return sf;
}
+
protected ServerSocket createServerSocket(int serverBindPort, int backlog, InetAddress bindAddress) throws IOException
{
ServerSocket svrSocket = getServerSocketFactory().createServerSocket(serverBindPort, backlog, bindAddress);
More information about the jboss-cvs-commits
mailing list