1 7 package org.jboss.remoting.transport.socket.ssl; 8 9 import java.io.IOException ; 10 import java.net.Socket ; 11 import javax.net.SocketFactory; 12 import org.jboss.remoting.InvokerLocator; 13 import org.jboss.remoting.security.SSLSocketBuilder; 14 import org.jboss.remoting.transport.socket.SocketClientInvoker; 15 16 19 public class SSLSocketClientInvoker extends SocketClientInvoker 20 { 21 public SSLSocketClientInvoker(InvokerLocator locator) throws IOException 22 { 23 super(locator); 24 } 25 26 protected Socket createSocket(String address, int port) throws IOException 27 { 28 SSLSocketBuilder server = new SSLSocketBuilder(); 29 SocketFactory sf = null; 30 try 31 { 32 sf = server.createSSLSocketFactory(); 33 } 34 catch(Exception e) 35 { 36 log.error("Error creating SSL Socket Factory for client invoker.", e); 37 throw new IOException ("Error creating SSL Socket Factory. Root cause: " + e.getMessage()); 38 } 39 Socket s = sf.createSocket(address, port); 40 41 return s; 42 } 43 44 } | Popular Tags |