1 7 package org.jboss.security.ssl; 8 9 import java.io.IOException ; 10 import java.net.ServerSocket ; 11 import java.net.UnknownHostException ; 12 import java.rmi.server.RMIServerSocketFactory ; 13 14 import org.jboss.security.SecurityDomain; 15 16 28 public class RMISSLServerSocketFactory implements RMIServerSocketFactory 29 { 30 private DomainServerSocketFactory domainFactory; 31 32 36 public RMISSLServerSocketFactory() 37 { 38 domainFactory = new DomainServerSocketFactory(); 39 } 40 41 public String getBindAddress() 42 { 43 return domainFactory.getBindAddress(); 44 } 45 public void setBindAddress(String host) throws UnknownHostException 46 { 47 domainFactory.setBindAddress(host); 48 } 49 50 public SecurityDomain getSecurityDomain() 51 { 52 return domainFactory.getSecurityDomain(); 53 } 54 public void setSecurityDomain(SecurityDomain securityDomain) 55 { 56 domainFactory.setSecurityDomain(securityDomain); 57 } 58 59 public boolean isWantsClientAuth() 60 { 61 return domainFactory.isWantsClientAuth(); 62 } 63 public void setWantsClientAuth(boolean wantsClientAuth) 64 { 65 domainFactory.setWantsClientAuth(wantsClientAuth); 66 } 67 68 public boolean isNeedsClientAuth() 69 { 70 return domainFactory.isNeedsClientAuth(); 71 } 72 public void setNeedsClientAuth(boolean needsClientAuth) 73 { 74 domainFactory.setNeedsClientAuth(needsClientAuth); 75 } 76 77 85 public ServerSocket createServerSocket(int port) 86 throws IOException 87 { 88 return domainFactory.createServerSocket(port); 89 } 90 91 public boolean equals(Object obj) 92 { 93 return obj instanceof RMISSLServerSocketFactory; 94 } 95 public int hashCode() 96 { 97 return getClass().getName().hashCode(); 98 } 99 } 100 | Popular Tags |