com.sun.grizzly.util.net.jsse
Class JSSE14SocketFactory

java.lang.Object
  extended by com.sun.grizzly.util.net.ServerSocketFactory
      extended by com.sun.grizzly.util.net.jsse.JSSESocketFactory
          extended by com.sun.grizzly.util.net.jsse.JSSE14SocketFactory
All Implemented Interfaces:
Cloneable

public class JSSE14SocketFactory
extends JSSESocketFactory

SSL server socket factory. It _requires_ a valid RSA key and JSSE.

Author:
Harish Prabandham, Costin Manolache, Stefan Freyr Stefansson, EKR -- renamed to JSSESocketFactory, Jan Luehe

Field Summary
 
Fields inherited from class com.sun.grizzly.util.net.jsse.JSSESocketFactory
clientAuth, enabledCiphers, initialized, logger, sslProxy
 
Fields inherited from class com.sun.grizzly.util.net.ServerSocketFactory
attributes, context
 
Constructor Summary
JSSE14SocketFactory()
           
 
Method Summary
protected  Collection<? extends CRL> getCRLs(String crlf)
          Load the collection of CRLs.
protected  String[] getEnabledProtocols(SSLServerSocket socket, String requestedProtocols)
           
protected  KeyManager[] getKeyManagers(String algorithm, String keyAlias)
          Gets the initialized key managers.
protected  CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore)
          Return the initialization parameters for the TrustManager.
protected  TrustManager[] getTrustManagers(String algorithm)
          Gets the intialized trust managers.
 void init()
          Reads the keystore and initializes the SSL socket factory.
protected  void setEnabledProtocols(SSLServerSocket socket, String[] protocols)
          Set the SSL protocol variants to be enabled.
 
Methods inherited from class com.sun.grizzly.util.net.jsse.JSSESocketFactory
acceptSocket, createSocket, createSocket, createSocket, getEnabledCiphers, getKeystore, getKeystorePassword, getTrustStore, handshake
 
Methods inherited from class com.sun.grizzly.util.net.ServerSocketFactory
getDefault, getSSLContext, initSocket, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSSE14SocketFactory

public JSSE14SocketFactory()
Method Detail

init

public void init()
          throws IOException
Reads the keystore and initializes the SSL socket factory.

Specified by:
init in class JSSESocketFactory
Throws:
IOException

getKeyManagers

protected KeyManager[] getKeyManagers(String algorithm,
                                      String keyAlias)
                               throws Exception
Gets the initialized key managers.

Throws:
Exception

getTrustManagers

protected TrustManager[] getTrustManagers(String algorithm)
                                   throws Exception
Gets the intialized trust managers.

Throws:
Exception

getParameters

protected CertPathParameters getParameters(String algorithm,
                                           String crlf,
                                           KeyStore trustStore)
                                    throws Exception
Return the initialization parameters for the TrustManager. Currently, only the default PKIX is supported.

Parameters:
algorithm - The algorithm to get parameters for.
crlf - The path to the CRL file.
trustStore - The configured TrustStore.
Returns:
The parameters including the CRLs and TrustStore.
Throws:
Exception

getCRLs

protected Collection<? extends CRL> getCRLs(String crlf)
                                     throws IOException,
                                            CRLException,
                                            CertificateException
Load the collection of CRLs.

Throws:
IOException
CRLException
CertificateException

setEnabledProtocols

protected void setEnabledProtocols(SSLServerSocket socket,
                                   String[] protocols)
Description copied from class: JSSESocketFactory
Set the SSL protocol variants to be enabled.

Specified by:
setEnabledProtocols in class JSSESocketFactory
Parameters:
socket - the SSLServerSocket.
protocols - the protocols to use.

getEnabledProtocols

protected String[] getEnabledProtocols(SSLServerSocket socket,
                                       String requestedProtocols)
Specified by:
getEnabledProtocols in class JSSESocketFactory


Copyright © 2010 SUN Microsystems. All Rights Reserved.