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
Interface SSLSocketBuilderMBean

All Known Implementing Classes:
  SSLSocketBuilder

    public interface SSLSocketBuilderMBean

The service interface of the socket builder.

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

Method Summary
`java.lang.Object` | `clone()` Creates a clone.
`void` | `create()` No-op - just needed for MBean service API.
`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.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` | `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` | `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.
`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.
`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 keyStoreURL)` 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 `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 `createSSLSocketFactory()`).
`void` | `start()` No-op - just needed for MBean service API.
`void` | `stop()` No-op - just needed for MBean server API.

Method Detail

### setUseSSLServerSocketFactory

    void setUseSSLServerSocketFactory(boolean shouldUse)

  Setting the flag that indicates if this class should use `SSLServerSocketFactory.getDefault()` when creating the ServerSocketFactory to use (when calling `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.

  Parameters:
    `shouldUse` -

### getUseSSLServerSocketFactory

    boolean getUseSSLServerSocketFactory()

  Return whether `SSLServerSocketFactory.getDefault()` will be used or not. See `setUseSSLServerSocketFactory(boolean)` for more information on what this means.

  Returns:
    the flag to indicate if the default server socket factory is used

### setUseSSLSocketFactory

    void setUseSSLSocketFactory(boolean shouldUse)

  Setting the flag that indicates if this class should use `SSLSocketFactory.getDefault()` when creating the SocketFactory to use (when calling `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.

  Parameters:
    `shouldUse` -

### getUseSSLSocketFactory

    boolean getUseSSLSocketFactory()

  Return whether `SSLSocketFactory.getDefault()` will be used or not. See `setUseSSLSocketFactory(boolean)` for more information on what this means.

  Returns:
    the flag to indicate if the default socket factory is used

### createSSLServerSocketFactory

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

  Will create a `SSLServerSocketFactory`. If the `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.

  Returns:
    the server socket factory that has been created
  Throws:
    `java.io.IOException`

### createSSLServerSocketFactory

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

  Will create a `SSLServerSocketFactory`. If the `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.

  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`

### createSSLSocketFactory

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

  Will create a `SSLSocketFactory`. If the `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.

  Returns:
    the server socket factory that has been created
  Throws:
    `java.io.IOException`

### createSSLSocketFactory

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

  Will create a `SSLSocketFactory`. If the `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.

  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`

### getServerSocketFactorySSLContext

    javax.net.ssl.SSLContext getServerSocketFactorySSLContext()

  Returns the SSL context that will create the server socket factories. This returns `null` until the context is initialized.

  Returns:
    the SSL context or `null` if it hasn't been initialized yet

### getSocketFactorySSLContext

    javax.net.ssl.SSLContext getSocketFactorySSLContext()

  Returns the SSL context that will create the socket factories. This returns `null` until the context is initialized.

  Returns:
    the SSL context or `null` if it hasn't been initialized yet

### getSecureSocketProtocol

    java.lang.String getSecureSocketProtocol()

  Returns the name of the secure socket protocol to be used by the sockets created by our factories.

  Returns:
    the secure socket protocol name (e.g. TLS)

### setSecureSocketProtocol

    void setSecureSocketProtocol(java.lang.String protocol)

  Sets the name of the secure socket protocol to be used by the sockets created by our factories.

  Parameters:
    `protocol` - the secure socket protocol name (e.g. TLS)

### getProvider

    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.

  Returns:
    the provider (will be `null` if not specifically `set`)

### setProvider

    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.

  Parameters:
    `provider` - the provider this object's SSL context should use

### getProviderName

    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.

  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)

### setProviderName

    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.

  Parameters:
    `providerName` - identifies by name the provider this object's SSL context should use

### getSecureRandom

    java.security.SecureRandom getSecureRandom()

  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.

  Returns:
    the secure random object

### setSecureRandom

    void setSecureRandom(java.security.SecureRandom secureRandom)

  Provides this class with the SecureRandom object to use when initializing the SSL contexts.

  Parameters:
    `secureRandom` -

### getKeyStore

    java.net.URL getKeyStore()

  Returns the path to the key store as a URL.

  Returns:
    path to keystore

### getKeyStoreURL

    java.lang.String getKeyStoreURL()

  Returns the path to the key store as a String.

  Returns:
    path to keystore

### setKeyStoreURL

    void setKeyStoreURL(java.lang.String keyStoreFilePath)

  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.

  Parameters:
    `keyStoreFilePath` -

### setKeyStore

    void setKeyStore(java.net.URL keyStoreURL)

  Sets the path to the keystore file as a URL

  Parameters:
    `keyStoreURL` -

### getKeyStoreType

    java.lang.String getKeyStoreType()

  Returns the keystore's file type. This is typically "JKS".

  Returns:
    keystore file type.

### setKeyStoreType

    void setKeyStoreType(java.lang.String keyStoreType)

  Sets the keystore's file type. Typically this is "JKS".

  Parameters:
    `keyStoreType` -

### getKeyStoreAlgorithm

    java.lang.String getKeyStoreAlgorithm()

  Returns the algorithm used to manage the keys in the keystore.

  Returns:
    the key management algorithm

### setKeyStoreAlgorithm

    void setKeyStoreAlgorithm(java.lang.String algorithm)

  Sets the algorithm used to manage the keys in the keystore.

  Parameters:
    `algorithm` -

### setKeyStorePassword

    void setKeyStorePassword(java.lang.String keyStorePassword)

  Sets the password used to gain access to the keystore.

  Parameters:
    `keyStorePassword` -

### getTrustStore

    java.net.URL getTrustStore()

  Gets the path to the truststore file.

  Returns:
    path to truststore

### getTrustStoreURL

    java.lang.String getTrustStoreURL()

  Gets the path to the truststore file.

  Returns:
    path to truststore

### setTrustStoreURL

    void setTrustStoreURL(java.lang.String trustStoreFilePath)

  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.

  Parameters:
    `trustStoreFilePath` - path to truststore

### setTrustStore

    void setTrustStore(java.net.URL trustStore)

  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.

  Parameters:
    `trustStore` - path to truststore

### getTrustStoreType

    java.lang.String getTrustStoreType()

  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.

  Returns:
    the truststore file type

### setTrustStoreType

    void setTrustStoreType(java.lang.String trustStoreType)

  Sets the truststore's file type. Typically this is "JKS".

  Parameters:
    `trustStoreType` -

### getTrustStoreAlgorithm

    java.lang.String getTrustStoreAlgorithm()

  Returns the algorithm used to manage the keys in the truststore.

  Returns:
    the key management algorithm

### setTrustStoreAlgorithm

    void setTrustStoreAlgorithm(java.lang.String algorithm)

  Sets the algorithm used to manage the keys in the truststore.

  Parameters:
    `algorithm` -

### setTrustStorePassword

    void setTrustStorePassword(java.lang.String trustStorePassword)

  Sets the password used to gain access to the truststore.

  Parameters:
    `trustStorePassword` -

### getKeyAlias

    java.lang.String getKeyAlias()

  Returns the key alias used to identify the client's key in the keystore.

  Returns:
    the client key alias

### setKeyAlias

    void setKeyAlias(java.lang.String alias)

  Sets the key alias used to identify the client's key in the keystore.

  Parameters:
    `alias` - the client key alias

### setKeyPassword

    void setKeyPassword(java.lang.String keyPassword)

  Sets the password to use for the keys within the key store.

  Parameters:
    `keyPassword` -

### isSocketUseClientMode

    boolean isSocketUseClientMode()

  Returns the flag to indicate if the sockets created by the factories should be in client mode.

  Returns:
    `true` if sockets should be in client mode

### isServerSocketUseClientMode

    boolean isServerSocketUseClientMode()

  Returns the flag to indicate if the server sockets created by the factories should be in client mode.

  Returns:
    `true` if sockets should be in client mode

### setSocketUseClientMode

    void setSocketUseClientMode(boolean useClientMode)

  Sets the flag to indicate if the sockets created by the factories should be in client mode.

  Parameters:
    `useClientMode` - `true` if sockets should be in client mode

### setServerSocketUseClientMode

    void setServerSocketUseClientMode(boolean useClientMode)

  Sets the flag to indicate if the server sockets created by the factories should be in client mode.

  Parameters:
    `useClientMode` - `true` if sockets should be in client mode

### isClientAuthModeNone

    boolean isClientAuthModeNone()

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

  Returns:
    `true` if client authentication should be disabled.

### isClientAuthModeWant

    boolean isClientAuthModeWant()

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

  Returns:
    `true` if client authentication should be enabled but isn't required.

### isClientAuthModeNeed

    boolean isClientAuthModeNeed()

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

  Returns:
    `true` if client authentication is required

### getClientAuthMode

    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. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

  If not set, `SSLSocketBuilder.CLIENT_AUTH_MODE_NONE` is returned.

  Returns:
    client auth mode
  See Also:
    `SSLSocketBuilder.CLIENT_AUTH_MODE_NONE`, `SSLSocketBuilder.CLIENT_AUTH_MODE_WANT`, `SSLSocketBuilder.CLIENT_AUTH_MODE_NEED`

### setClientAuthMode

    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. This is only used for sockets in server mode (see `SSLSocket.getUseClientMode`).

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

  Parameters:
    `mode` - client auth mode
  See Also:
    `SSLSocketBuilder.CLIENT_AUTH_MODE_NONE`, `SSLSocketBuilder.CLIENT_AUTH_MODE_WANT`, `SSLSocketBuilder.CLIENT_AUTH_MODE_NEED`

### isServerAuthMode

    boolean isServerAuthMode()

  Returns the server authentication mode to say if a client socket will require to authenticate a server certificate as trustworthy.

  Returns:
    server auth mode

### setServerAuthMode

    void setServerAuthMode(boolean mode)

  Sets the server authentication mode to say if a client socket will require to authenticate a server certificate as trustworthy.

  Parameters:
    `mode` - server auth mode

### clone

    java.lang.Object clone()

  Creates a clone.

  Returns:

### create

    void create()
                throws java.lang.Exception

  No-op - just needed for MBean service API.

  Throws:
    `java.lang.Exception`

### start

    void start()
               throws java.lang.Exception

  No-op - just needed for MBean service API. Create already called at this point.

  Throws:
    `java.lang.Exception`

### stop

    void stop()

  No-op - just needed for MBean server API.

### destroy

    void destroy()

  No-op - just needed for MBean server API.

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.