org.jboss.security.ssl
Class DomainServerSocketFactory

java.lang.Object
  extended by javax.net.ServerSocketFactory
      extended by javax.net.ssl.SSLServerSocketFactory
          extended by org.jboss.security.ssl.DomainServerSocketFactory

public class DomainServerSocketFactory
extends SSLServerSocketFactory

An implementation of ServerSocketFactory that creates SSL server sockets using the JSSE SSLContext and a JBossSX SecurityDomain for the KeyManagerFactory and TrustManagerFactory objects.

Version:
$Revision: 57203 $
Author:
Scott.Stark@jboss.org
See Also:
SSLContext, SecurityDomain

Constructor Summary
DomainServerSocketFactory()
          A default constructor for use when created by Class.newInstance.
DomainServerSocketFactory(SecurityDomain securityDomain)
          Create a socket factory instance that uses the given SecurityDomain as the source for the SSL KeyManagerFactory and TrustManagerFactory.
 
Method Summary
 ServerSocket createServerSocket(int port)
           
 ServerSocket createServerSocket(int port, int backlog)
           
 ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress)
          Returns a server socket which uses only the specified network interface on the local host, is bound to a the specified port, and uses the specified connection backlog.
 String getBindAddress()
           
 String[] getCiperSuites()
          Deprecated. use getCipherSuites
 String[] getCipherSuites()
           
static ServerSocketFactory getDefault()
          The default ServerSocketFactory which looks to the java:/jaas/other security domain configuration.
 String[] getDefaultCipherSuites()
           
 String[] getProtocols()
           
 SecurityDomain getSecurityDomain()
           
static SSLSession getSSLSession(String sessionID)
           
 String[] getSupportedCipherSuites()
           
 boolean isNeedsClientAuth()
           
 boolean isWantsClientAuth()
           
 void setBindAddress(String host)
           
 void setCiperSuites(String[] cipherSuites)
          Deprecated. use getCipherSuites
 void setCipherSuites(String[] cipherSuites)
           
 void setNeedsClientAuth(boolean needsClientAuth)
           
 void setProtocols(String[] protocols)
           
 void setSecurityDomain(SecurityDomain securityDomain)
           
 void setWantsClientAuth(boolean wantsClientAuth)
           
 
Methods inherited from class javax.net.ServerSocketFactory
createServerSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainServerSocketFactory

public DomainServerSocketFactory()
A default constructor for use when created by Class.newInstance. The factory is not usable until its SecurityDomain has been established.


DomainServerSocketFactory

public DomainServerSocketFactory(SecurityDomain securityDomain)
                          throws IOException
Create a socket factory instance that uses the given SecurityDomain as the source for the SSL KeyManagerFactory and TrustManagerFactory.

Throws:
IOException
Method Detail

getDefault

public static ServerSocketFactory getDefault()
The default ServerSocketFactory which looks to the java:/jaas/other security domain configuration.


getSSLSession

public static SSLSession getSSLSession(String sessionID)

getBindAddress

public String getBindAddress()

setBindAddress

public void setBindAddress(String host)
                    throws UnknownHostException
Throws:
UnknownHostException

getSecurityDomain

public SecurityDomain getSecurityDomain()

setSecurityDomain

public void setSecurityDomain(SecurityDomain securityDomain)

isWantsClientAuth

public boolean isWantsClientAuth()

setWantsClientAuth

public void setWantsClientAuth(boolean wantsClientAuth)

isNeedsClientAuth

public boolean isNeedsClientAuth()

setNeedsClientAuth

public void setNeedsClientAuth(boolean needsClientAuth)

getCipherSuites

public String[] getCipherSuites()
Returns:
current set of cipher suite names

setCipherSuites

public void setCipherSuites(String[] cipherSuites)
Parameters:
cipherSuites - - set of cipher suite names to use

getCiperSuites

public String[] getCiperSuites()
Deprecated. use getCipherSuites

This is an error due to a typo in the ciperSuites ivar

Returns:
current set of cipher suite names

setCiperSuites

public void setCiperSuites(String[] cipherSuites)
Deprecated. use getCipherSuites

This is an error due to a typo in the ciperSuites ivar

Parameters:
cipherSuites - - set of cipher suite names to use

getProtocols

public String[] getProtocols()

setProtocols

public void setProtocols(String[] protocols)

createServerSocket

public ServerSocket createServerSocket(int port)
                                throws IOException
Specified by:
createServerSocket in class ServerSocketFactory
Throws:
IOException

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog)
                                throws IOException
Specified by:
createServerSocket in class ServerSocketFactory
Throws:
IOException

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog,
                                       InetAddress ifAddress)
                                throws IOException
Returns a server socket which uses only the specified network interface on the local host, is bound to a the specified port, and uses the specified connection backlog. The socket is configured with the socket options (such as accept timeout) given to this factory.

Specified by:
createServerSocket in class ServerSocketFactory
Parameters:
port - the port to listen to
backlog - how many connections are queued
ifAddress - the network interface address to use
Throws:
IOException - for networking errors

getDefaultCipherSuites

public String[] getDefaultCipherSuites()
Specified by:
getDefaultCipherSuites in class SSLServerSocketFactory

getSupportedCipherSuites

public String[] getSupportedCipherSuites()
Specified by:
getSupportedCipherSuites in class SSLServerSocketFactory


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.