Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.remoting.security
Class SSLSocketBuilder

    java.lang.Object
      org.jboss.remoting.security.SSLSocketBuilder

All Implemented Interfaces:
  java.lang.Cloneable, SSLSocketBuilderMBean

    public class SSLSocketBuilder

extends java.lang.Object
implements SSLSocketBuilderMBean, java.lang.Cloneable

A class that contains code that remoting factories need to build customized server and client SSL sockets.

Version:
  $Revision: 1357 $
Author:
  John Mazzitelli, Tom Elrod

Nested Class Summary
`protected class` | `SSLSocketBuilder.NullStoreURLException` Used to indicate a store URL was not specified and thus the store is not available.

Field Summary
`static java.lang.String` | `CLIENT_AUTH_MODE_NEED` Client auth mode that indicates that client authentication is required.
`static java.lang.String` | `CLIENT_AUTH_MODE_NONE` Client auth mode that indicates client authentication will not be peformed.
`static java.lang.String` | `CLIENT_AUTH_MODE_WANT` Client auth mode that indicates that we want client authentication but it isn't required.
`static java.lang.String` | `DEFAULT_KEY_STORE_ALGORITHM` Default key/trust store algorithm if one net set as bean property or via config.
`static java.lang.String` | `DEFAULT_KEY_STORE_TYPE` Default key/trust store type if one not set as bean property, via config, or via system property.
`static java.lang.String` | `DEFAULT_SSL_PROTOCOL` If the protocol isn't specified, this will be the default.
`static java.lang.String` | `REMOTING_CLIENT_AUTH_MODE` Constant defining the config property used to define if sockets need or want client authentication.
`static java.lang.String` | `REMOTING_DEFAULT_SOCKET_FACTORY_CLASS` System property key to define the fully qualified class name of default socket factory to use when not using custom config.
`static java.lang.String` | `REMOTING_KEY_ALIAS` Constant defining the config property that indicates the client's alias as found in the keystore.
`static java.lang.String` | `REMOTING_KEY_PASSWORD` Constant defining the config property that indicates the key password for the keys in the key store.
`static java.lang.String` | `REMOTING_KEY_STORE_ALGORITHM` Constant defining the config property that defines the key management algorithm used by the keystore.
`static java.lang.String` | `REMOTING_KEY_STORE_FILE_PATH` Constant defining the config property used to define where JBoss/Remoting will look for the keystore file.
`static java.lang.String` | `REMOTING_KEY_STORE_PASSWORD` Constant defining the config property that defines the password of the keystore.
`static java.lang.String` | `REMOTING_KEY_STORE_TYPE` Constant defining the config property that defines the keystore's type.
`static java.lang.String` | `REMOTING_SERVER_AUTH_MODE` Constant defining the config property used to define if a client should attempt to authenticate a server certificate as one it trusts.
`static java.lang.String` | `REMOTING_SERVER_SOCKET_USE_CLIENT_MODE` Constant defining the config property used to define if the server sockets will be in client or server mode.
`static java.lang.String` | `REMOTING_SOCKET_USE_CLIENT_MODE` Constant defining the config property used to define if the sockets will be in client or server mode.
`static java.lang.String` | `REMOTING_SSL_PROTOCOL` Constant defining the config property used to define the SSL socket protocol to use.
`static java.lang.String` | `REMOTING_SSL_PROVIDER_NAME` Constant defining the config property used to define the SSL provider to use.
`static java.lang.String` | `REMOTING_TRUST_STORE_ALGORITHM` Constant defining the config property that defines the key management algorithm used by the truststore.
`static java.lang.String` | `REMOTING_TRUST_STORE_FILE_PATH` Constant defining the config property used to define where JBoss/Remoting will look for the truststore file.
`static java.lang.String` | `REMOTING_TRUST_STORE_PASSWORD` Constant defining the config property that defines the password of the keystore.
`static java.lang.String` | `REMOTING_TRUST_STORE_TYPE` Constant defining the config property that defines the truststore's type.
`static java.lang.String` | `STANDARD_KEY_STORE_FILE_PATH` Constant that defines the standard system property that the javax.net.ssl classes look for when locating the keystore file.
`static java.lang.String` | `STANDARD_KEY_STORE_PASSWORD` Constant that defines the standard system property that the javax.net.ssl classes look for when needing the keystore password.
`static java.lang.String` | `STANDARD_KEY_STORE_TYPE` Constant that defines the standard system property that the javax.net.ssl classes look for when needing to know what type the keystore file is.
`static java.lang.String` | `STANDARD_TRUST_STORE_FILE_PATH` Constant that defines the standard system property that the javax.net.ssl classes look for when locating the truststore file.
`static java.lang.String` | `STANDARD_TRUST_STORE_PASSWORD` Constant that defines the standard system property that the javax.net.ssl classes look for when needing the truststore password.
`static java.lang.String` | `STANDARD_TRUST_STORE_TYPE` Constant that defines the standard system property that the javax.net.ssl classes look for when needing to know what type the truststore file is.

Constructor Summary
`SSLSocketBuilder()` Constructor for `SSLSocketBuilder` that does not have any configuration so it falls back to all defaults.
`SSLSocketBuilder(java.util.Map config)` Constructor for `SSLSocketBuilder` that allows the caller to override the default settings for the various SSL configuration properties.

Method Summary
`java.lang.Object` | `clone()` Creates a clone.
`void` | `create()` No-op - just needed for MBean service API.
`protected javax.net.ServerSocketFactory` | `createCustomServerSocketFactory(CustomSSLServerSocketFactory wrapper)` This creates a fully custom SSL server socket factory using this object's configuration.
`protected javax.net.SocketFactory` | `createCustomSocketFactory(CustomSSLSocketFactory wrapper)` This creates a fully custom SSL socket factory using this object's configuration.
`protected void` | `createServerSocketFactorySSLContext()` Creates (but does not initialize) the SSL context used by this object to create server socket factories.
`protected void` | `createSocketFactorySSLContext()` Creates (but does not initialize) the SSL context used by this object to create socket factories.
`javax.net.ServerSocketFactory` | `createSSLServerSocketFactory()` Will create a `SSLServerSocketFactory`.
`javax.net.ServerSocketFactory` | `createSSLServerSocketFactory(CustomSSLServerSocketFactory wrapper)` Will create a `SSLServerSocketFactory`.
`javax.net.SocketFactory` | `createSSLSocketFactory()` Will create a `SSLSocketFactory`.
`javax.net.SocketFactory` | `createSSLSocketFactory(CustomSSLSocketFactory wrapper)` Will create a `SSLSocketFactory`.
`void` | `destroy()` No-op - just needed for MBean server API.
`java.lang.String` | `getClientAuthMode()` Returns the client authentication mode to say if sockets will not require client authentication, will want client auth but not require it or to require it.
`java.lang.String` | `getKeyAlias()` Returns the key alias used to identify the client's key in the keystore.
`java.lang.String` | `getKeyPassword()` Returns the password to use for the keys within the key store.
`java.net.URL` | `getKeyStore()` Returns the path to the key store as a URL.
`java.lang.String` | `getKeyStoreAlgorithm()` Returns the algorithm used to manage the keys in the keystore.
`java.lang.String` | `getKeyStorePassword()` Returns the password used to gain access to the keystore.
`java.lang.String` | `getKeyStoreType()` Returns the keystore's file type.
`java.lang.String` | `getKeyStoreURL()` Returns the path to the key store as a String.
`java.security.Provider` | `getProvider()` Returns the Cryptographic Service Provider which supplies a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.
`java.lang.String` | `getProviderName()` Returns the name of the Cryptographic Service Provider which refers to a package or set of packages that supply a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.
`java.security.SecureRandom` | `getSecureRandom()` Returns the secure random used by this object's SSL context.
`java.lang.String` | `getSecureSocketProtocol()` Returns the name of the secure socket protocol to be used by the sockets created by our factories.
`javax.net.ssl.SSLContext` | `getServerSocketFactorySSLContext()` Returns the SSL context that will create the server socket factories.
`javax.net.ssl.SSLContext` | `getSocketFactorySSLContext()` Returns the SSL context that will create the socket factories.
`java.net.URL` | `getTrustStore()` Gets the path to the truststore file.
`java.lang.String` | `getTrustStoreAlgorithm()` Returns the algorithm used to manage the keys in the truststore.
`java.lang.String` | `getTrustStorePassword()` Returns the password used to gain access to the truststore.
`java.lang.String` | `getTrustStoreType()` Gets the truststore's file type.
`java.lang.String` | `getTrustStoreURL()` Gets the path to the truststore file.
`boolean` | `getUseSSLServerSocketFactory()` Return whether `SSLServerSocketFactory.getDefault()` will be used or not.
`boolean` | `getUseSSLSocketFactory()` Return whether `SSLSocketFactory.getDefault()` will be used or not.
`protected void` | `initializeServerSocketFactorySSLContext()` Initializes the SSL context used by this object that will create the server socket factories.
`protected void` | `initializeSocketFactorySSLContext()` Initializes the SSL context used by this object that will create the socket factories.
`boolean` | `isClientAuthModeNeed()` Determines if there must be client authentication - it is required.
`boolean` | `isClientAuthModeNone()` Determines if there should be no client authentication.
`boolean` | `isClientAuthModeWant()` Determines if there should be client authentication but it isn't required.
`boolean` | `isServerAuthMode()` Returns the server authentication mode to say if a client socket will require to authenticate a server certificate as trustworthy.
`boolean` | `isServerSocketUseClientMode()` Returns the flag to indicate if the server sockets created by the factories should be in client mode.
`boolean` | `isSocketUseClientMode()` Returns the flag to indicate if the sockets created by the factories should be in client mode.
`protected javax.net.ssl.KeyManager[]` | `loadKeyManagers()` Loads the key managers based on this object's truststore.
`protected java.security.KeyStore` | `loadKeyStore(java.lang.String storeType, java.net.URL storePathURL, java.lang.String storePassword)` Loads a key store file and returns it.
`protected javax.net.ssl.TrustManager[]` | `loadTrustManagers(boolean isClientMode)` Loads the trust managers based on this object's truststore.
`void` | `setClientAuthMode(java.lang.String mode)` Sets the client authentication mode to say if sockets will not require client authentication, will want client auth but not require it or to require it.
`void` | `setKeyAlias(java.lang.String alias)` Sets the key alias used to identify the client's key in the keystore.
`void` | `setKeyPassword(java.lang.String keyPassword)` Sets the password to use for the keys within the key store.
`void` | `setKeyStore(java.net.URL keyStore)` Sets the path to the keystore file as a URL
`void` | `setKeyStoreAlgorithm(java.lang.String algorithm)` Sets the algorithm used to manage the keys in the keystore.
`void` | `setKeyStorePassword(java.lang.String keyStorePassword)` Sets the password used to gain access to the keystore.
`void` | `setKeyStoreType(java.lang.String keyStoreType)` Sets the keystore's file type.
`void` | `setKeyStoreURL(java.lang.String keyStoreFilePath)` Sets the path to the keystore file.
`void` | `setProvider(java.security.Provider provider)` Sets the Cryptographic Service Provider which supplies a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.
`void` | `setProviderName(java.lang.String providerName)` Sets the name of the Cryptographic Service Provider which refers to a package or set of packages that supply a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.
`void` | `setSecureRandom(java.security.SecureRandom secureRandom)` Provides this class with the SecureRandom object to use when initializing the SSL contexts.
`void` | `setSecureSocketProtocol(java.lang.String protocol)` Sets the name of the secure socket protocol to be used by the sockets created by our factories.
`void` | `setServerAuthMode(boolean mode)` Sets the server authentication mode to say if a client socket will require to authenticate a server certificate as trustworthy.
`void` | `setServerSocketUseClientMode(boolean useClientMode)` Sets the flag to indicate if the server sockets created by the factories should be in client mode.
`void` | `setSocketUseClientMode(boolean useClientMode)` Sets the flag to indicate if the sockets created by the factories should be in client mode.
`void` | `setTrustStore(java.net.URL trustStore)` Sets the path to the truststore file.
`void` | `setTrustStoreAlgorithm(java.lang.String algorithm)` Sets the algorithm used to manage the keys in the truststore.
`void` | `setTrustStorePassword(java.lang.String trustStorePassword)` Sets the password used to gain access to the truststore.
`void` | `setTrustStoreType(java.lang.String trustStoreType)` Sets the truststore's file type.
`void` | `setTrustStoreURL(java.lang.String trustStoreFilePath)` Sets the path to the truststore file.
`void` | `setUseSSLServerSocketFactory(boolean shouldUse)` Setting the flag that indicates if this class should use `SSLServerSocketFactory.getDefault()` when creating the ServerSocketFactory to use (when calling `SSLSocketBuilderMBean.createSSLServerSocketFactory()`).
`void` | `setUseSSLSocketFactory(boolean shouldUse)` Setting the flag that indicates if this class should use `SSLSocketFactory.getDefault()` when creating the SocketFactory to use (when calling `SSLSocketBuilderMBean.createSSLSocketFactory()`).
`void` | `start()` No-op - just needed for MBean service API.
`void` | `stop()` No-op - just needed for MBean server API.
`protected java.net.URL` | `validateStoreURL(java.lang.String storePath)` Given a store file path, this will verify that the store actually exists.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### REMOTING_SSL_PROVIDER_NAME

    public static final java.lang.String REMOTING_SSL_PROVIDER_NAME

  Constant defining the config property used to define the SSL provider to use.

  See Also:
    Constant Field Values

### REMOTING_SSL_PROTOCOL

    public static final java.lang.String REMOTING_SSL_PROTOCOL

  Constant defining the config property used to define the SSL socket protocol to use.

  See Also:
    Constant Field Values

### DEFAULT_SSL_PROTOCOL

    public static final java.lang.String DEFAULT_SSL_PROTOCOL

  If the protocol isn't specified, this will be the default. Value is "TLS".

  See Also:
    Constant Field Values

### REMOTING_SOCKET_USE_CLIENT_MODE

    public static final java.lang.String REMOTING_SOCKET_USE_CLIENT_MODE

  Constant defining the config property used to define if the sockets will be in client or server mode.

  See Also:
    Constant Field Values

### REMOTING_SERVER_SOCKET_USE_CLIENT_MODE

    public static final java.lang.String REMOTING_SERVER_SOCKET_USE_CLIENT_MODE

  Constant defining the config property used to define if the server sockets will be in client or server mode.

  See Also:
    Constant Field Values

### REMOTING_CLIENT_AUTH_MODE

    public static final java.lang.String REMOTING_CLIENT_AUTH_MODE

  Constant defining the config property used to define if sockets need or want client authentication. This configuration option is only useful for sockets in the server mode. The value of such a property is one of the CLIENT_AUTH_MODE_XXX constants.

  See Also:
    Constant Field Values

### CLIENT_AUTH_MODE_NONE

    public static final java.lang.String CLIENT_AUTH_MODE_NONE

  Client auth mode that indicates client authentication will not be peformed.

  See Also:
    Constant Field Values

### CLIENT_AUTH_MODE_WANT

    public static final java.lang.String CLIENT_AUTH_MODE_WANT

  Client auth mode that indicates that we want client authentication but it isn't required.

  See Also:
    Constant Field Values

### CLIENT_AUTH_MODE_NEED

    public static final java.lang.String CLIENT_AUTH_MODE_NEED

  Client auth mode that indicates that client authentication is required.

  See Also:
    Constant Field Values

### REMOTING_SERVER_AUTH_MODE

    public static final java.lang.String REMOTING_SERVER_AUTH_MODE

  Constant defining the config property used to define if a client should attempt to authenticate a server certificate as one it trusts. The value of such a property is a boolean.

  See Also:
    Constant Field Values

### REMOTING_KEY_STORE_FILE_PATH

    public static final java.lang.String REMOTING_KEY_STORE_FILE_PATH

  Constant defining the config property used to define where JBoss/Remoting will look for the keystore file. This can be relative to the thread's classloader or can be an absolute path on the file system or can be a URL.

  See Also:
    Constant Field Values

### REMOTING_KEY_STORE_TYPE

    public static final java.lang.String REMOTING_KEY_STORE_TYPE

  Constant defining the config property that defines the keystore's type.

  See Also:
    Constant Field Values

### REMOTING_KEY_STORE_ALGORITHM

    public static final java.lang.String REMOTING_KEY_STORE_ALGORITHM

  Constant defining the config property that defines the key management algorithm used by the keystore.

  See Also:
    Constant Field Values

### REMOTING_KEY_STORE_PASSWORD

    public static final java.lang.String REMOTING_KEY_STORE_PASSWORD

  Constant defining the config property that defines the password of the keystore.

  See Also:
    Constant Field Values

### REMOTING_KEY_ALIAS

    public static final java.lang.String REMOTING_KEY_ALIAS

  Constant defining the config property that indicates the client's alias as found in the keystore.

  See Also:
    Constant Field Values

### REMOTING_KEY_PASSWORD

    public static final java.lang.String REMOTING_KEY_PASSWORD

  Constant defining the config property that indicates the key password for the keys in the key store.

  See Also:
    Constant Field Values

### STANDARD_KEY_STORE_FILE_PATH

    public static final java.lang.String STANDARD_KEY_STORE_FILE_PATH

  Constant that defines the standard system property that the javax.net.ssl classes look for when locating the keystore file.

  See Also:
    Constant Field Values

### STANDARD_KEY_STORE_TYPE

    public static final java.lang.String STANDARD_KEY_STORE_TYPE

  Constant that defines the standard system property that the javax.net.ssl classes look for when needing to know what type the keystore file is.

  See Also:
    Constant Field Values

### STANDARD_KEY_STORE_PASSWORD

    public static final java.lang.String STANDARD_KEY_STORE_PASSWORD

  Constant that defines the standard system property that the javax.net.ssl classes look for when needing the keystore password.

  See Also:
    Constant Field Values

### DEFAULT_KEY_STORE_TYPE

    public static final java.lang.String DEFAULT_KEY_STORE_TYPE

  Default key/trust store type if one not set as bean property, via config, or via system property. Value is 'JKS'.

  See Also:
    Constant Field Values

### DEFAULT_KEY_STORE_ALGORITHM

    public static final java.lang.String DEFAULT_KEY_STORE_ALGORITHM

  Default key/trust store algorithm if one net set as bean property or via config. Value is 'SunX509'.

  See Also:
    Constant Field Values

### REMOTING_TRUST_STORE_FILE_PATH

    public static final java.lang.String REMOTING_TRUST_STORE_FILE_PATH

  Constant defining the config property used to define where JBoss/Remoting will look for the truststore file. This can be relative to the thread's classloader or can be an absolute path on the file system.

  See Also:
    Constant Field Values

### REMOTING_TRUST_STORE_TYPE

    public static final java.lang.String REMOTING_TRUST_STORE_TYPE

  Constant defining the config property that defines the truststore's type.

  See Also:
    Constant Field Values

### REMOTING_TRUST_STORE_ALGORITHM

    public static final java.lang.String REMOTING_TRUST_STORE_ALGORITHM

  Constant defining the config property that defines the key management algorithm used by the truststore.

  See Also:
    Constant Field Values

### REMOTING_TRUST_STORE_PASSWORD

    public static final java.lang.String REMOTING_TRUST_STORE_PASSWORD

  Constant defining the config property that defines the password of the keystore.

  See Also:
    Constant Field Values

### STANDARD_TRUST_STORE_FILE_PATH

    public static final java.lang.String STANDARD_TRUST_STORE_FILE_PATH

  Constant that defines the standard system property that the javax.net.ssl classes look for when locating the truststore file.

  See Also:
    Constant Field Values

### STANDARD_TRUST_STORE_TYPE

    public static final java.lang.String STANDARD_TRUST_STORE_TYPE

  Constant that defines the standard system property that the javax.net.ssl classes look for when needing to know what type the truststore file is.

  See Also:
    Constant Field Values

### STANDARD_TRUST_STORE_PASSWORD

    public static final java.lang.String STANDARD_TRUST_STORE_PASSWORD

  Constant that defines the standard system property that the javax.net.ssl classes look for when needing the truststore password.

  See Also:
    Constant Field Values

### REMOTING_DEFAULT_SOCKET_FACTORY_CLASS

    public static final java.lang.String REMOTING_DEFAULT_SOCKET_FACTORY_CLASS

  System property key to define the fully qualified class name of default socket factory to use when not using custom config.

  See Also:
    Constant Field Values

Constructor Detail

### SSLSocketBuilder

    public SSLSocketBuilder()

  Constructor for `SSLSocketBuilder` that does not have any configuration so it falls back to all defaults.

### SSLSocketBuilder

    public SSLSocketBuilder(java.util.Map config)

  Constructor for `SSLSocketBuilder` that allows the caller to override the default settings for the various SSL configuration properties.

  Parameters:
    `config` - configuration with properties defining things like where the keystore and truststore files are, their types, etc.

Method Detail

### setUseSSLServerSocketFactory

    public void setUseSSLServerSocketFactory(boolean shouldUse)

  Description copied from interface: `SSLSocketBuilderMBean`
  Setting the flag that indicates if this class should use `SSLServerSocketFactory.getDefault()` when creating the ServerSocketFactory to use (when calling `SSLSocketBuilderMBean.createSSLServerSocketFactory()`). If `true`, will allow for setting key store location (via `javax.net.ssl.keyStore` system property) and setting of the key store password (via `javax.net.ssl.keyStorePassword` system property) and no other configuration is needed (none of the other setters will need to be called and are in fact ignored). If set to `false`, will allow the custom setting of secure socket protocol, key store management algorithm, file location, password among other things.

  The default value is `true`.

  NOTE: If this is not explicitly set to `false`, no customizations can be made and the default implementation provided by the JVM vendor being used will be executed.

  Specified by:
    `setUseSSLServerSocketFactory` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setUseSSLServerSocketFactory(boolean)`

### getUseSSLServerSocketFactory

    public boolean getUseSSLServerSocketFactory()

  Description copied from interface: `SSLSocketBuilderMBean`
  Return whether `SSLServerSocketFactory.getDefault()` will be used or not. See `SSLSocketBuilderMBean.setUseSSLServerSocketFactory(boolean)` for more information on what this means.

  Specified by:
    `getUseSSLServerSocketFactory` in interface `SSLSocketBuilderMBean`
  Returns:
    the flag to indicate if the default server socket factory is used
  See Also:
    `SSLSocketBuilderMBean.getUseSSLServerSocketFactory()`

### setUseSSLSocketFactory

    public void setUseSSLSocketFactory(boolean shouldUse)

  Description copied from interface: `SSLSocketBuilderMBean`
  Setting the flag that indicates if this class should use `SSLSocketFactory.getDefault()` when creating the SocketFactory to use (when calling `SSLSocketBuilderMBean.createSSLSocketFactory()`). If `true`, will allow for setting trust store location (via `javax.net.ssl.trustStore` system property) and setting of the key store password (via `javax.net.ssl.trustStorePassword` system property) and no other configuration is needed (none of the other setters will need to be called and are in fact ignored). If set to `false`, will allow the custom setting of secure socket protocol, key store management algorithm, file location, password among other things.

  The default value is `true`.

  NOTE: If this is not explicitly set to `false`, no customizations can be made and the default implementation provided by the JVM vendor being used will be executed.

  Specified by:
    `setUseSSLSocketFactory` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setUseSSLSocketFactory(boolean)`

### getUseSSLSocketFactory

    public boolean getUseSSLSocketFactory()

  Description copied from interface: `SSLSocketBuilderMBean`
  Return whether `SSLSocketFactory.getDefault()` will be used or not. See `SSLSocketBuilderMBean.setUseSSLSocketFactory(boolean)` for more information on what this means.

  Specified by:
    `getUseSSLSocketFactory` in interface `SSLSocketBuilderMBean`
  Returns:
    the flag to indicate if the default socket factory is used
  See Also:
    `SSLSocketBuilderMBean.getUseSSLSocketFactory()`

### createSSLServerSocketFactory

    public javax.net.ServerSocketFactory createSSLServerSocketFactory()
                                                               throws java.io.IOException

  Description copied from interface: `SSLSocketBuilderMBean`
  Will create a `SSLServerSocketFactory`. If the `SSLSocketBuilderMBean.getUseSSLServerSocketFactory()` property is set to `true` (which is the default), it will use `SSLServerSocketFactory.getDefault()` to get the server socket factory. Otherwise, if property is `false`, will use all the other custom properties that have been set to create a custom server socket factory.

  Specified by:
    `createSSLServerSocketFactory` in interface `SSLSocketBuilderMBean`
  Returns:
    the server socket factory that has been created
  Throws:
    `java.io.IOException`
  See Also:
    `SSLSocketBuilderMBean.createSSLServerSocketFactory()`

### createSSLServerSocketFactory

    public javax.net.ServerSocketFactory createSSLServerSocketFactory(CustomSSLServerSocketFactory wrapper)
                                                               throws java.io.IOException

  Description copied from interface: `SSLSocketBuilderMBean`
  Will create a `SSLServerSocketFactory`. If the `SSLSocketBuilderMBean.getUseSSLServerSocketFactory()` property is set to `true` (which is the default), it will use `SSLServerSocketFactory.getDefault()` to get the server socket factory. Otherwise, if property is `false`, will use all the other custom properties that have been set to create a custom server socket factory. The given custom factory will be used as the wrapper around the factory created by this method and will be the factory returned. If it is `null`, one will be created and returned.

  Specified by:
    `createSSLServerSocketFactory` in interface `SSLSocketBuilderMBean`
  Parameters:
    `wrapper` - the wrapper that will contain the created factory - used so the caller can further customize the factory and its sockets as desired (may be `null`)
  Returns:
    the server socket factory that has been created (may be wrapper if it was not `null`)
  Throws:
    `java.io.IOException`
  See Also:
    `SSLSocketBuilderMBean.createSSLServerSocketFactory(org.jboss.remoting.security.CustomSSLServerSocketFactory)`

### createCustomServerSocketFactory

    protected javax.net.ServerSocketFactory createCustomServerSocketFactory(CustomSSLServerSocketFactory wrapper)
                                                                     throws java.io.IOException

  This creates a fully custom SSL server socket factory using this object's configuration.

  Parameters:
    `wrapper` - the wrapper where the created factory will be stored
  Returns:
    the SSLServerSocketFactory
  Throws:
    `java.io.IOException`

### createSSLSocketFactory

    public javax.net.SocketFactory createSSLSocketFactory()
                                                   throws java.io.IOException

  Description copied from interface: `SSLSocketBuilderMBean`
  Will create a `SSLSocketFactory`. If the `SSLSocketBuilderMBean.getUseSSLSocketFactory()` property is set to `true` (which is the default), it will use `SSLSocketFactory.getDefault()` to get the socket factory. Otherwise, if property is `false`, will use all the other custom properties that have been set to create a custom server socket factory.

  Specified by:
    `createSSLSocketFactory` in interface `SSLSocketBuilderMBean`
  Returns:
    the server socket factory that has been created
  Throws:
    `java.io.IOException`
  See Also:
    `SSLSocketBuilderMBean.createSSLSocketFactory()`

### createSSLSocketFactory

    public javax.net.SocketFactory createSSLSocketFactory(CustomSSLSocketFactory wrapper)
                                                   throws java.io.IOException

  Description copied from interface: `SSLSocketBuilderMBean`
  Will create a `SSLSocketFactory`. If the `SSLSocketBuilderMBean.getUseSSLSocketFactory()` property is set to `true` (which is the default), it will use `SSLSocketFactory.getDefault()` to get the socket factory. Otherwise, if property is `false`, will use all the other custom properties that have been set to create a custom server socket factory. The given custom factory will be used as the wrapper around the factory created by this method and will be the factory returned. If it is `null`, one will be created and returned.

  Specified by:
    `createSSLSocketFactory` in interface `SSLSocketBuilderMBean`
  Parameters:
    `wrapper` - the wrapper that will contain the created factory - used so the caller can further customize the factory and its sockets as desired (may be `null`)
  Returns:
    the server socket factory that has been created (may be wrapper if it was not `null`)
  Throws:
    `java.io.IOException`
  See Also:
    `SSLSocketBuilderMBean.createSSLSocketFactory(org.jboss.remoting.security.CustomSSLSocketFactory)`

### createCustomSocketFactory

    protected javax.net.SocketFactory createCustomSocketFactory(CustomSSLSocketFactory wrapper)
                                                         throws java.io.IOException

  This creates a fully custom SSL socket factory using this object's configuration.

  Parameters:
    `wrapper` - the wrapper where the created factory will be stored
  Returns:
    the wrapper with the new factory stored in it
  Throws:
    `java.io.IOException`

### getServerSocketFactorySSLContext

    public javax.net.ssl.SSLContext getServerSocketFactorySSLContext()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the SSL context that will create the server socket factories. This returns `null` until the context is initialized.

  Specified by:
    `getServerSocketFactorySSLContext` in interface `SSLSocketBuilderMBean`
  Returns:
    the SSL context or `null` if it hasn't been initialized yet
  See Also:
    `SSLSocketBuilderMBean.getServerSocketFactorySSLContext()`

### getSocketFactorySSLContext

    public javax.net.ssl.SSLContext getSocketFactorySSLContext()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the SSL context that will create the socket factories. This returns `null` until the context is initialized.

  Specified by:
    `getSocketFactorySSLContext` in interface `SSLSocketBuilderMBean`
  Returns:
    the SSL context or `null` if it hasn't been initialized yet
  See Also:
    `SSLSocketBuilderMBean.getSocketFactorySSLContext()`

### getSecureSocketProtocol

    public java.lang.String getSecureSocketProtocol()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the name of the secure socket protocol to be used by the sockets created by our factories.

  Specified by:
    `getSecureSocketProtocol` in interface `SSLSocketBuilderMBean`
  Returns:
    the secure socket protocol name (e.g. TLS)
  See Also:
    `SSLSocketBuilderMBean.getSecureSocketProtocol()`

### setSecureSocketProtocol

    public void setSecureSocketProtocol(java.lang.String protocol)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the name of the secure socket protocol to be used by the sockets created by our factories.

  Specified by:
    `setSecureSocketProtocol` in interface `SSLSocketBuilderMBean`
  Parameters:
    `protocol` - the secure socket protocol name (e.g. TLS)
  See Also:
    `SSLSocketBuilderMBean.setSecureSocketProtocol(String)`

### getProvider

    public java.security.Provider getProvider()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the Cryptographic Service Provider which supplies a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.

  Specified by:
    `getProvider` in interface `SSLSocketBuilderMBean`
  Returns:
    the provider (will be `null` if not specifically `set`)
  See Also:
    `SSLSocketBuilderMBean.getProvider()`

### setProvider

    public void setProvider(java.security.Provider provider)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the Cryptographic Service Provider which supplies a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.

  Specified by:
    `setProvider` in interface `SSLSocketBuilderMBean`
  Parameters:
    `provider` - the provider this object's SSL context should use
  See Also:
    `SSLSocketBuilderMBean.setProvider(java.security.Provider)`

### getProviderName

    public java.lang.String getProviderName()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the name of the Cryptographic Service Provider which refers to a package or set of packages that supply a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.

  Specified by:
    `getProviderName` in interface `SSLSocketBuilderMBean`
  Returns:
    identifies by name the provider this object's SSL context should use (will be `null` if not specifically `set` or found in the configuration)
  See Also:
    `SSLSocketBuilderMBean.getProviderName()`

### setProviderName

    public void setProviderName(java.lang.String providerName)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the name of the Cryptographic Service Provider which refers to a package or set of packages that supply a concrete implementation of a subset of the Java 2 SDK Security API cryptography features.

  Specified by:
    `setProviderName` in interface `SSLSocketBuilderMBean`
  Parameters:
    `providerName` - identifies by name the provider this object's SSL context should use
  See Also:
    `SSLSocketBuilderMBean.setProviderName(java.lang.String)`

### getSecureRandom

    public java.security.SecureRandom getSecureRandom()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the secure random used by this object's SSL context. If this object does not yet have a secure random object, one is created here.

  Specified by:
    `getSecureRandom` in interface `SSLSocketBuilderMBean`
  Returns:
    the secure random object
  See Also:
    `SSLSocketBuilderMBean.getSecureRandom()`

### setSecureRandom

    public void setSecureRandom(java.security.SecureRandom secureRandom)

  Description copied from interface: `SSLSocketBuilderMBean`
  Provides this class with the SecureRandom object to use when initializing the SSL contexts.

  Specified by:
    `setSecureRandom` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setSecureRandom(java.security.SecureRandom)`

### getKeyStoreURL

    public java.lang.String getKeyStoreURL()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the path to the key store as a String.

  Specified by:
    `getKeyStoreURL` in interface `SSLSocketBuilderMBean`
  Returns:
    path to keystore
  See Also:
    `SSLSocketBuilderMBean.getKeyStoreURL()`

### getKeyStore

    public java.net.URL getKeyStore()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the path to the key store as a URL.

  Specified by:
    `getKeyStore` in interface `SSLSocketBuilderMBean`
  Returns:
    path to keystore
  See Also:
    `SSLSocketBuilderMBean.getKeyStore()`

### setKeyStoreURL

    public void setKeyStoreURL(java.lang.String keyStoreFilePath)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the path to the keystore file. This can be relative to the classloader or can be an absolute path to someplace on the file system or can be a URL string. If the path is not valid, a runtime exception is thrown.

  Specified by:
    `setKeyStoreURL` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setKeyStoreURL(java.lang.String)`

### setKeyStore

    public void setKeyStore(java.net.URL keyStore)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the path to the keystore file as a URL

  Specified by:
    `setKeyStore` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setKeyStore(java.net.URL)`

### getKeyStoreType

    public java.lang.String getKeyStoreType()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the keystore's file type. This is typically "JKS".

  Specified by:
    `getKeyStoreType` in interface `SSLSocketBuilderMBean`
  Returns:
    keystore file type.
  See Also:
    `SSLSocketBuilderMBean.getKeyStoreType()`

### setKeyStoreType

    public void setKeyStoreType(java.lang.String keyStoreType)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the keystore's file type. Typically this is "JKS".

  Specified by:
    `setKeyStoreType` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setKeyStoreType(java.lang.String)`

### getKeyStoreAlgorithm

    public java.lang.String getKeyStoreAlgorithm()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the algorithm used to manage the keys in the keystore.

  Specified by:
    `getKeyStoreAlgorithm` in interface `SSLSocketBuilderMBean`
  Returns:
    the key management algorithm
  See Also:
    `SSLSocketBuilderMBean.getKeyStoreAlgorithm()`

### setKeyStoreAlgorithm

    public void setKeyStoreAlgorithm(java.lang.String algorithm)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the algorithm used to manage the keys in the keystore.

  Specified by:
    `setKeyStoreAlgorithm` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setKeyStoreAlgorithm(java.lang.String)`

### getKeyStorePassword

    public java.lang.String getKeyStorePassword()

  Returns the password used to gain access to the keystore.

  Returns:
    keystore password

### setKeyStorePassword

    public void setKeyStorePassword(java.lang.String keyStorePassword)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the password used to gain access to the keystore.

  Specified by:
    `setKeyStorePassword` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setKeyStorePassword(java.lang.String)`

### getTrustStoreURL

    public java.lang.String getTrustStoreURL()

  Description copied from interface: `SSLSocketBuilderMBean`
  Gets the path to the truststore file.

  Specified by:
    `getTrustStoreURL` in interface `SSLSocketBuilderMBean`
  Returns:
    path to truststore
  See Also:
    `SSLSocketBuilderMBean.getTrustStoreURL()`

### getTrustStore

    public java.net.URL getTrustStore()

  Description copied from interface: `SSLSocketBuilderMBean`
  Gets the path to the truststore file.

  Specified by:
    `getTrustStore` in interface `SSLSocketBuilderMBean`
  Returns:
    path to truststore
  See Also:
    `SSLSocketBuilderMBean.getTrustStore()`

### setTrustStore

    public void setTrustStore(java.net.URL trustStore)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the path to the truststore file. This can be relative to the classloader or can be an absolute path to someplace on the file system or can be a URL string. If the path is not valid, a runtime exception is thrown.

  Specified by:
    `setTrustStore` in interface `SSLSocketBuilderMBean`
  Parameters:
    `trustStore` - path to truststore
  See Also:
    `SSLSocketBuilderMBean.setTrustStore(java.net.URL)`

### setTrustStoreURL

    public void setTrustStoreURL(java.lang.String trustStoreFilePath)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the path to the truststore file. This can be relative to the classloader or can be an absolute path to someplace on the file system or can be a URL string. If the path is not valid, a runtime exception is thrown.

  Specified by:
    `setTrustStoreURL` in interface `SSLSocketBuilderMBean`
  Parameters:
    `trustStoreFilePath` - path to truststore
  See Also:
    `SSLSocketBuilderMBean.setTrustStoreURL(java.lang.String)`

### getTrustStoreType

    public java.lang.String getTrustStoreType()

  Description copied from interface: `SSLSocketBuilderMBean`
  Gets the truststore's file type. Typically this is "JKS". If not set, the key store file type is used or the default if that isn't set.

  Specified by:
    `getTrustStoreType` in interface `SSLSocketBuilderMBean`
  Returns:
    the truststore file type
  See Also:
    `SSLSocketBuilderMBean.getTrustStoreType()`

### setTrustStoreType

    public void setTrustStoreType(java.lang.String trustStoreType)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the truststore's file type. Typically this is "JKS".

  Specified by:
    `setTrustStoreType` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setTrustStoreType(java.lang.String)`

### getTrustStoreAlgorithm

    public java.lang.String getTrustStoreAlgorithm()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the algorithm used to manage the keys in the truststore.

  Specified by:
    `getTrustStoreAlgorithm` in interface `SSLSocketBuilderMBean`
  Returns:
    the key management algorithm
  See Also:
    `SSLSocketBuilderMBean.getTrustStoreAlgorithm()`

### setTrustStoreAlgorithm

    public void setTrustStoreAlgorithm(java.lang.String algorithm)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the algorithm used to manage the keys in the truststore.

  Specified by:
    `setTrustStoreAlgorithm` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setTrustStoreAlgorithm(java.lang.String)`

### getTrustStorePassword

    public java.lang.String getTrustStorePassword()

  Returns the password used to gain access to the truststore.

  Returns:
    truststore password

### setTrustStorePassword

    public void setTrustStorePassword(java.lang.String trustStorePassword)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the password used to gain access to the truststore.

  Specified by:
    `setTrustStorePassword` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setTrustStorePassword(java.lang.String)`

### getKeyAlias

    public java.lang.String getKeyAlias()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the key alias used to identify the client's key in the keystore.

  Specified by:
    `getKeyAlias` in interface `SSLSocketBuilderMBean`
  Returns:
    the client key alias
  See Also:
    `SSLSocketBuilderMBean.getKeyAlias()`

### setKeyAlias

    public void setKeyAlias(java.lang.String alias)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the key alias used to identify the client's key in the keystore.

  Specified by:
    `setKeyAlias` in interface `SSLSocketBuilderMBean`
  Parameters:
    `alias` - the client key alias
  See Also:
    `SSLSocketBuilderMBean.setKeyAlias(java.lang.String)`

### getKeyPassword

    public java.lang.String getKeyPassword()

  Returns the password to use for the keys within the key store. If this value is not set, this will return `null` but when this value is needed by this class, the value for the key store password will be used instead.

  Returns:
    key password

### setKeyPassword

    public void setKeyPassword(java.lang.String keyPassword)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the password to use for the keys within the key store.

  Specified by:
    `setKeyPassword` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.setKeyPassword(java.lang.String)`

### isSocketUseClientMode

    public boolean isSocketUseClientMode()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the flag to indicate if the sockets created by the factories should be in client mode.

  Specified by:
    `isSocketUseClientMode` in interface `SSLSocketBuilderMBean`
  Returns:
    `true` if sockets should be in client mode
  See Also:
    `SSLSocketBuilderMBean.isSocketUseClientMode()`

### isServerSocketUseClientMode

    public boolean isServerSocketUseClientMode()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the flag to indicate if the server sockets created by the factories should be in client mode.

  Specified by:
    `isServerSocketUseClientMode` in interface `SSLSocketBuilderMBean`
  Returns:
    `true` if sockets should be in client mode
  See Also:
    `SSLSocketBuilderMBean.isServerSocketUseClientMode()`

### setSocketUseClientMode

    public void setSocketUseClientMode(boolean useClientMode)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the flag to indicate if the sockets created by the factories should be in client mode.

  Specified by:
    `setSocketUseClientMode` in interface `SSLSocketBuilderMBean`
  Parameters:
    `useClientMode` - `true` if sockets should be in client mode
  See Also:
    `SSLSocketBuilderMBean.setSocketUseClientMode(boolean)`

### setServerSocketUseClientMode

    public void setServerSocketUseClientMode(boolean useClientMode)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the flag to indicate if the server sockets created by the factories should be in client mode.

  Specified by:
    `setServerSocketUseClientMode` in interface `SSLSocketBuilderMBean`
  Parameters:
    `useClientMode` - `true` if sockets should be in client mode
  See Also:
    `SSLSocketBuilderMBean.setServerSocketUseClientMode(boolean)`

### isClientAuthModeNone

    public boolean isClientAuthModeNone()

  Description copied from interface: `SSLSocketBuilderMBean`
  Determines if there should be no client authentication. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

  Specified by:
    `isClientAuthModeNone` in interface `SSLSocketBuilderMBean`
  Returns:
    `true` if client authentication should be disabled.
  See Also:
    `SSLSocketBuilderMBean.isClientAuthModeNone()`

### isClientAuthModeWant

    public boolean isClientAuthModeWant()

  Description copied from interface: `SSLSocketBuilderMBean`
  Determines if there should be client authentication but it isn't required. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

  Specified by:
    `isClientAuthModeWant` in interface `SSLSocketBuilderMBean`
  Returns:
    `true` if client authentication should be enabled but isn't required.
  See Also:
    `SSLSocketBuilderMBean.isClientAuthModeWant()`

### isClientAuthModeNeed

    public boolean isClientAuthModeNeed()

  Description copied from interface: `SSLSocketBuilderMBean`
  Determines if there must be client authentication - it is required. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

  Specified by:
    `isClientAuthModeNeed` in interface `SSLSocketBuilderMBean`
  Returns:
    `true` if client authentication is required
  See Also:
    `SSLSocketBuilderMBean.isClientAuthModeNeed()`

### getClientAuthMode

    public java.lang.String getClientAuthMode()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the client authentication mode to say if sockets will not require client authentication, will want client auth but not require it or to require it. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

  If not set, `CLIENT_AUTH_MODE_NONE` is returned.

  Specified by:
    `getClientAuthMode` in interface `SSLSocketBuilderMBean`
  Returns:
    client auth mode
  See Also:
    `SSLSocketBuilderMBean.getClientAuthMode()`

### setClientAuthMode

    public void setClientAuthMode(java.lang.String mode)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the client authentication mode to say if sockets will not require client authentication, will want client auth but not require it or to require it. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

  If `mode` is invalid or `null`, will default to `CLIENT_AUTH_MODE_NONE`.

  Specified by:
    `setClientAuthMode` in interface `SSLSocketBuilderMBean`
  Parameters:
    `mode` - client auth mode
  See Also:
    `SSLSocketBuilderMBean.setClientAuthMode(java.lang.String)`

### isServerAuthMode

    public boolean isServerAuthMode()

  Description copied from interface: `SSLSocketBuilderMBean`
  Returns the server authentication mode to say if a client socket will require to authenticate a server certificate as trustworthy.

  Specified by:
    `isServerAuthMode` in interface `SSLSocketBuilderMBean`
  Returns:
    server auth mode
  See Also:
    `SSLSocketBuilderMBean.isServerAuthMode()`

### setServerAuthMode

    public void setServerAuthMode(boolean mode)

  Description copied from interface: `SSLSocketBuilderMBean`
  Sets the server authentication mode to say if a client socket will require to authenticate a server certificate as trustworthy.

  Specified by:
    `setServerAuthMode` in interface `SSLSocketBuilderMBean`
  Parameters:
    `mode` - server auth mode
  See Also:
    `SSLSocketBuilderMBean.setServerAuthMode(boolean)`

### createServerSocketFactorySSLContext

    protected void createServerSocketFactorySSLContext()
                                                throws java.io.IOException

  Creates (but does not initialize) the SSL context used by this object to create server socket factories. The provider/protocol is used to determine what SSL context to use. Call `initializeServerSocketFactorySSLContext()` if you want to create and initialize in one method call. If the server socket factory SSL context was already created, this will create a new one and remove the old one.

  Throws:
    `java.io.IOException`

### createSocketFactorySSLContext

    protected void createSocketFactorySSLContext()
                                          throws java.io.IOException

  Creates (but does not initialize) the SSL context used by this object to create socket factories. The provider/protocol is used to determine what SSL context to use. Call `initializeSocketFactorySSLContext()` if you want to create and initialize in one method call. If the socket factory SSL context was already created, this will create a new one and remove the old one.

  Throws:
    `java.io.IOException`

### initializeServerSocketFactorySSLContext

    protected void initializeServerSocketFactorySSLContext()
                                                    throws java.io.IOException

  Initializes the SSL context used by this object that will create the server socket factories. If the SSL context is not yet created, this method will also create it. The provider/protocol is used to determine what SSL context to use. Key and trust managers are loaded and a secure random object is created and the SSL context for the protocol/provider is initialized with them.

  Throws:
    `java.io.IOException`

### initializeSocketFactorySSLContext

    protected void initializeSocketFactorySSLContext()
                                              throws java.io.IOException

  Initializes the SSL context used by this object that will create the socket factories. If the SSL context is not yet created, this method will also create it. The provider/protocol is used to determine what SSL context to use. Key and trust managers are loaded and a secure random object is created and the SSL context for the protocol/provider is initialized with them.

  Throws:
    `java.io.IOException`

### loadTrustManagers

    protected javax.net.ssl.TrustManager[] loadTrustManagers(boolean isClientMode)
                                                      throws java.security.NoSuchProviderException,
                                                             java.security.NoSuchAlgorithmException,
                                                             java.io.IOException,
                                                             java.security.cert.CertificateException,
                                                             java.security.KeyStoreException,
                                                             SSLSocketBuilder.NullStoreURLException

  Loads the trust managers based on this object's truststore.

  Returns:
    array of trust managers that should be loaded in this object's SSL context
  Throws:
    `java.security.NoSuchProviderException`
    `java.security.NoSuchAlgorithmException`
    `java.io.IOException`
    `java.security.cert.CertificateException`
    `java.security.KeyStoreException`
    `SSLSocketBuilder.NullStoreURLException`

### loadKeyManagers

    protected javax.net.ssl.KeyManager[] loadKeyManagers()
                                                  throws java.security.NoSuchProviderException,
                                                         java.security.NoSuchAlgorithmException,
                                                         java.io.IOException,
                                                         java.security.cert.CertificateException,
                                                         java.security.KeyStoreException,
                                                         java.security.UnrecoverableKeyException,
                                                         SSLSocketBuilder.NullStoreURLException

  Loads the key managers based on this object's truststore.

  Returns:
    array of key managers that should be loaded in this object's SSL context
  Throws:
    `java.security.NoSuchProviderException`
    `java.security.NoSuchAlgorithmException`
    `java.io.IOException`
    `java.security.cert.CertificateException`
    `java.security.KeyStoreException`
    `java.security.UnrecoverableKeyException`
    `SSLSocketBuilder.NullStoreURLException`

### loadKeyStore

    protected java.security.KeyStore loadKeyStore(java.lang.String storeType,
                                                  java.net.URL storePathURL,
                                                  java.lang.String storePassword)
                                           throws java.security.KeyStoreException,
                                                  java.security.NoSuchProviderException,
                                                  java.io.IOException,
                                                  java.security.NoSuchAlgorithmException,
                                                  java.security.cert.CertificateException,
                                                  SSLSocketBuilder.NullStoreURLException

  Loads a key store file and returns it.

  Parameters:
    `storeType` - the type of store file
    `storePathURL` - the URL to the file - may be relative to the current thread's classloader or may be absolute path to a file on the file system.
    `storePassword` - password to gain access to the store file
  Returns:
    the key store
  Throws:
    `java.security.KeyStoreException`
    `java.security.NoSuchProviderException`
    `java.io.IOException`
    `java.security.NoSuchAlgorithmException`
    `java.security.cert.CertificateException`
    `SSLSocketBuilder.NullStoreURLException`

### validateStoreURL

    protected java.net.URL validateStoreURL(java.lang.String storePath)
                                     throws java.io.IOException

  Given a store file path, this will verify that the store actually exists. First, it checks to see if its a valid URL, then it checks to see if the file path is found in the file system and finally will be checked to see if it can be found as a resource within the current thread's classloader. An exception is thrown if the store cannot be found.

  Parameters:
    `storePath` - the path which can be a URL, path to a resource in classloader or a file path on the file system.
  Returns:
    the URL of the file that was found
  Throws:
    `java.io.IOException` - if the store could not be found

### clone

    public java.lang.Object clone()

  Description copied from interface: `SSLSocketBuilderMBean`
  Creates a clone.

  Specified by:
    `clone` in interface `SSLSocketBuilderMBean`
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:

### create

    public void create()
                throws java.lang.Exception

  Description copied from interface: `SSLSocketBuilderMBean`
  No-op - just needed for MBean service API.

  Specified by:
    `create` in interface `SSLSocketBuilderMBean`
  Throws:
    `java.lang.Exception`
  See Also:
    `SSLSocketBuilderMBean.create()`

### start

    public void start()
               throws java.lang.Exception

  Description copied from interface: `SSLSocketBuilderMBean`
  No-op - just needed for MBean service API. Create already called at this point.

  Specified by:
    `start` in interface `SSLSocketBuilderMBean`
  Throws:
    `java.lang.Exception`
  See Also:
    `SSLSocketBuilderMBean.start()`

### stop

    public void stop()

  Description copied from interface: `SSLSocketBuilderMBean`
  No-op - just needed for MBean server API.

  Specified by:
    `stop` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.stop()`

### destroy

    public void destroy()

  Description copied from interface: `SSLSocketBuilderMBean`
  No-op - just needed for MBean server API.

  Specified by:
    `destroy` in interface `SSLSocketBuilderMBean`
  See Also:
    `SSLSocketBuilderMBean.destroy()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.