com.sun.grizzly.ssl
Class SSLEngineConfigurator

java.lang.Object
  extended by com.sun.grizzly.ssl.SSLEngineConfigurator

public class SSLEngineConfigurator
extends Object

Utility class, which helps to configure SSLEngine.

Author:
Alexey Stashok

Constructor Summary
SSLEngineConfigurator(SSLContext sslContext)
           
SSLEngineConfigurator(SSLContext sslContext, boolean clientMode, boolean needClientAuth, boolean wantClientAuth)
           
 
Method Summary
 void configure(SSLEngine sslEngine)
          Configure passed SSLEngine, using current configurator settings
 SSLEngine createSSLEngine()
          Create and configure SSLEngine, basing on current settings.
 String[] getEnabledCipherSuites()
           
 String[] getEnabledProtocols()
           
 boolean isCipherConfigured()
           
 boolean isClientMode()
          Will SSLEngine be configured to work in client mode.
 boolean isNeedClientAuth()
           
 boolean isProtocolConfigured()
           
 boolean isWantClientAuth()
           
 void setCipherConfigured(boolean isCipherConfigured)
           
 void setClientMode(boolean clientMode)
          Set SSLEngine to be configured to work in client mode.
 void setEnabledCipherSuites(String[] enabledCipherSuites)
           
 void setEnabledProtocols(String[] enabledProtocols)
           
 void setNeedClientAuth(boolean needClientAuth)
           
 void setProtocolConfigured(boolean isProtocolConfigured)
           
 void setWantClientAuth(boolean wantClientAuth)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSLEngineConfigurator

public SSLEngineConfigurator(SSLContext sslContext)

SSLEngineConfigurator

public SSLEngineConfigurator(SSLContext sslContext,
                             boolean clientMode,
                             boolean needClientAuth,
                             boolean wantClientAuth)
Method Detail

createSSLEngine

public SSLEngine createSSLEngine()
Create and configure SSLEngine, basing on current settings.

Returns:
SSLEngine.

configure

public void configure(SSLEngine sslEngine)
Configure passed SSLEngine, using current configurator settings

Parameters:
sslEngine - SSLEngine to configure.

isClientMode

public boolean isClientMode()
Will SSLEngine be configured to work in client mode.

Returns:
true, if SSLEngine will be configured to work in client mode, or false for server mode.

setClientMode

public void setClientMode(boolean clientMode)
Set SSLEngine to be configured to work in client mode.

Parameters:
clientMode - true, if SSLEngine will be configured to work in client mode, or false for server mode.

isNeedClientAuth

public boolean isNeedClientAuth()

setNeedClientAuth

public void setNeedClientAuth(boolean needClientAuth)

isWantClientAuth

public boolean isWantClientAuth()

setWantClientAuth

public void setWantClientAuth(boolean wantClientAuth)

getEnabledCipherSuites

public String[] getEnabledCipherSuites()

setEnabledCipherSuites

public void setEnabledCipherSuites(String[] enabledCipherSuites)

getEnabledProtocols

public String[] getEnabledProtocols()

setEnabledProtocols

public void setEnabledProtocols(String[] enabledProtocols)

isCipherConfigured

public boolean isCipherConfigured()

setCipherConfigured

public void setCipherConfigured(boolean isCipherConfigured)

isProtocolConfigured

public boolean isProtocolConfigured()

setProtocolConfigured

public void setProtocolConfigured(boolean isProtocolConfigured)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 SUN Microsystems. All Rights Reserved.