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 javax.net.ssl.SSLServerSocketFactory

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

See Also:
SSLContext, SecurityDomain (src)

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

Method Detail

getBindAddress

public java.lang.String getBindAddress()

setBindAddress

public void setBindAddress(java.lang.String host)
                    throws java.net.UnknownHostException
Throws:
java.net.UnknownHostException

getSecurityDomain

public SecurityDomain (src)  getSecurityDomain()

setSecurityDomain

public void setSecurityDomain(SecurityDomain (src)  securityDomain)

isWantsClientAuth

public boolean isWantsClientAuth()

setWantsClientAuth

public void setWantsClientAuth(boolean wantsClientAuth)

isNeedsClientAuth

public boolean isNeedsClientAuth()

setNeedsClientAuth

public void setNeedsClientAuth(boolean needsClientAuth)

createServerSocket

public java.net.ServerSocket createServerSocket(int port)
                                         throws java.io.IOException
Throws:
java.io.IOException

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int backlog)
                                         throws java.io.IOException
Throws:
java.io.IOException

createServerSocket

public java.net.ServerSocket createServerSocket(int port,
                                                int backlog,
                                                java.net.InetAddress ifAddress)
                                         throws java.io.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:
java.io.IOException - for networking errors

getDefault

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


getDefaultCipherSuites

public java.lang.String[] getDefaultCipherSuites()

getSupportedCipherSuites

public java.lang.String[] getSupportedCipherSuites()