org.jboss.security.ssl
Class DomainServerSocketFactory

java.lang.Object
  extended byjavax.net.ServerSocketFactory
      extended byjavax.net.ssl.SSLServerSocketFactory
          extended byorg.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: 1.10.4.2 $
Author:
Scott.Stark@jboss.org
See Also:
SSLContext, SecurityDomain

Constructor Summary
DomainServerSocketFactory()
          A default constructor for use when created by Class.newInstance.
DomainServerSocketFactory(org.jboss.security.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()
           
static ServerSocketFactory getDefault()
          The default ServerSocketFactory which looks to the java:/jaas/other security domain configuration.
 String[] getDefaultCipherSuites()
           
 org.jboss.security.SecurityDomain getSecurityDomain()
           
 String[] getSupportedCipherSuites()
           
 boolean isNeedsClientAuth()
           
 boolean isWantsClientAuth()
           
 void setBindAddress(String host)
           
 void setNeedsClientAuth(boolean needsClientAuth)
           
 void setSecurityDomain(org.jboss.security.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(org.jboss.security.SecurityDomain securityDomain)
                          throws IOException
Create a socket factory instance that uses the given SecurityDomain as the source for the SSL KeyManagerFactory and TrustManagerFactory.

Method Detail

getBindAddress

public String getBindAddress()

setBindAddress

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

getSecurityDomain

public org.jboss.security.SecurityDomain getSecurityDomain()

setSecurityDomain

public void setSecurityDomain(org.jboss.security.SecurityDomain securityDomain)

isWantsClientAuth

public boolean isWantsClientAuth()

setWantsClientAuth

public void setWantsClientAuth(boolean wantsClientAuth)

isNeedsClientAuth

public boolean isNeedsClientAuth()

setNeedsClientAuth

public void setNeedsClientAuth(boolean needsClientAuth)

createServerSocket

public ServerSocket createServerSocket(int port)
                                throws IOException
Throws:
IOException

createServerSocket

public ServerSocket createServerSocket(int port,
                                       int backlog)
                                throws IOException
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.

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

getDefault

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


getDefaultCipherSuites

public String[] getDefaultCipherSuites()

getSupportedCipherSuites

public String[] getSupportedCipherSuites()


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