org.ldaptive.ssl
Class SslConfig

java.lang.Object
  extended by org.ldaptive.AbstractConfig
      extended by org.ldaptive.ssl.SslConfig

public class SslConfig
extends AbstractConfig

Contains all the configuration data for SSL and startTLS. Providers are not guaranteed to support all the options contained here.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.AbstractConfig
logger
 
Constructor Summary
SslConfig()
          Default constructor.
SslConfig(CredentialConfig config)
          Creates a new ssl config.
SslConfig(CredentialConfig config, TrustManager... managers)
          Creates a new ssl config.
SslConfig(TrustManager... managers)
          Creates a new ssl config.
 
Method Summary
 CredentialConfig getCredentialConfig()
          Returns the credential config.
 String[] getEnabledCipherSuites()
          Returns the names of the SSL cipher suites to use for secure connections.
 String[] getEnabledProtocols()
          Returns the names of the SSL protocols to use for secure connections.
 HandshakeCompletedListener[] getHandshakeCompletedListeners()
          Returns the handshake completed listeners to use for secure connections.
 TrustManager[] getTrustManagers()
          Returns the trust managers.
 boolean isEmpty()
          Returns whether this ssl config contains any configuration data.
static SslConfig newSslConfig(SslConfig config)
          Returns a ssl config initialized with the supplied config.
 void setCredentialConfig(CredentialConfig config)
          Sets the credential config.
 void setEnabledCipherSuites(String... suites)
          Sets the SSL cipher suites to use for secure connections.
 void setEnabledProtocols(String... protocols)
          Sets the SSL protocol versions to use for secure connections.
 void setHandshakeCompletedListeners(HandshakeCompletedListener... listeners)
          Sets the handshake completed listeners to use for secure connections.
 void setTrustManagers(TrustManager... managers)
          Sets the trust managers.
 String toString()
          
 
Methods inherited from class org.ldaptive.AbstractConfig
checkImmutable, checkStringInput, makeImmutable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SslConfig

public SslConfig()
Default constructor.


SslConfig

public SslConfig(CredentialConfig config)
Creates a new ssl config.

Parameters:
config - credential config

SslConfig

public SslConfig(TrustManager... managers)
Creates a new ssl config.

Parameters:
managers - trust managers

SslConfig

public SslConfig(CredentialConfig config,
                 TrustManager... managers)
Creates a new ssl config.

Parameters:
config - credential config
managers - trust managers
Method Detail

isEmpty

public boolean isEmpty()
Returns whether this ssl config contains any configuration data.

Returns:
whether all properties are null

getCredentialConfig

public CredentialConfig getCredentialConfig()
Returns the credential config.

Returns:
credential config

setCredentialConfig

public void setCredentialConfig(CredentialConfig config)
Sets the credential config.

Parameters:
config - credential config

getTrustManagers

public TrustManager[] getTrustManagers()
Returns the trust managers.

Returns:
trust managers

setTrustManagers

public void setTrustManagers(TrustManager... managers)
Sets the trust managers.

Parameters:
managers - trust managers

getEnabledCipherSuites

public String[] getEnabledCipherSuites()
Returns the names of the SSL cipher suites to use for secure connections.

Returns:
cipher suites

setEnabledCipherSuites

public void setEnabledCipherSuites(String... suites)
Sets the SSL cipher suites to use for secure connections.

Parameters:
suites - cipher suites

getEnabledProtocols

public String[] getEnabledProtocols()
Returns the names of the SSL protocols to use for secure connections.

Returns:
enabled protocols

setEnabledProtocols

public void setEnabledProtocols(String... protocols)
Sets the SSL protocol versions to use for secure connections.

Parameters:
protocols - enabled protocols

getHandshakeCompletedListeners

public HandshakeCompletedListener[] getHandshakeCompletedListeners()
Returns the handshake completed listeners to use for secure connections.

Returns:
handshake completed listeners

setHandshakeCompletedListeners

public void setHandshakeCompletedListeners(HandshakeCompletedListener... listeners)
Sets the handshake completed listeners to use for secure connections.

Parameters:
listeners - for SSL handshake events

newSslConfig

public static SslConfig newSslConfig(SslConfig config)
Returns a ssl config initialized with the supplied config.

Parameters:
config - ssl config to read properties from
Returns:
ssl config

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.