|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SSLSocketBuilderMBean
The service interface of the socket builder.
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 |
---|
void setUseSSLServerSocketFactory(boolean shouldUse)
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.
shouldUse
- boolean getUseSSLServerSocketFactory()
SSLServerSocketFactory.getDefault()
will be used or not. See
setUseSSLServerSocketFactory(boolean)
for more information on what this means.
void setUseSSLSocketFactory(boolean shouldUse)
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.
shouldUse
- boolean getUseSSLSocketFactory()
SSLSocketFactory.getDefault()
will be used or not. See
setUseSSLSocketFactory(boolean)
for more information on what this means.
javax.net.ServerSocketFactory createSSLServerSocketFactory() throws java.io.IOException
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.
java.io.IOException
javax.net.ServerSocketFactory createSSLServerSocketFactory(CustomSSLServerSocketFactory wrapper) throws java.io.IOException
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.
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
)
null
)
java.io.IOException
javax.net.SocketFactory createSSLSocketFactory() throws java.io.IOException
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.
java.io.IOException
javax.net.SocketFactory createSSLSocketFactory(CustomSSLSocketFactory wrapper) throws java.io.IOException
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.
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
)
null
)
java.io.IOException
javax.net.ssl.SSLContext getServerSocketFactorySSLContext()
null
until
the context is initialized.
null
if it hasn't been initialized yetjavax.net.ssl.SSLContext getSocketFactorySSLContext()
null
until the
context is initialized.
null
if it hasn't been initialized yetjava.lang.String getSecureSocketProtocol()
void setSecureSocketProtocol(java.lang.String protocol)
protocol
- the secure socket protocol name (e.g. TLS)java.security.Provider getProvider()
null
if not specifically set
)void setProvider(java.security.Provider provider)
provider
- the provider this object's SSL context should usejava.lang.String getProviderName()
null
if not specifically set
or found in the configuration)void setProviderName(java.lang.String providerName)
providerName
- identifies by name the provider this object's SSL context should usejava.security.SecureRandom getSecureRandom()
void setSecureRandom(java.security.SecureRandom secureRandom)
secureRandom
- java.net.URL getKeyStore()
java.lang.String getKeyStoreURL()
void setKeyStoreURL(java.lang.String keyStoreFilePath)
keyStoreFilePath
- void setKeyStore(java.net.URL keyStoreURL)
keyStoreURL
- java.lang.String getKeyStoreType()
void setKeyStoreType(java.lang.String keyStoreType)
keyStoreType
- java.lang.String getKeyStoreAlgorithm()
void setKeyStoreAlgorithm(java.lang.String algorithm)
algorithm
- void setKeyStorePassword(java.lang.String keyStorePassword)
keyStorePassword
- java.net.URL getTrustStore()
java.lang.String getTrustStoreURL()
void setTrustStoreURL(java.lang.String trustStoreFilePath)
trustStoreFilePath
- path to truststorevoid setTrustStore(java.net.URL trustStore)
trustStore
- path to truststorejava.lang.String getTrustStoreType()
void setTrustStoreType(java.lang.String trustStoreType)
trustStoreType
- java.lang.String getTrustStoreAlgorithm()
void setTrustStoreAlgorithm(java.lang.String algorithm)
algorithm
- void setTrustStorePassword(java.lang.String trustStorePassword)
trustStorePassword
- java.lang.String getKeyAlias()
void setKeyAlias(java.lang.String alias)
alias
- the client key aliasvoid setKeyPassword(java.lang.String keyPassword)
keyPassword
- boolean isSocketUseClientMode()
true
if sockets should be in client modeboolean isServerSocketUseClientMode()
true
if sockets should be in client modevoid setSocketUseClientMode(boolean useClientMode)
useClientMode
- true
if sockets should be in client modevoid setServerSocketUseClientMode(boolean useClientMode)
useClientMode
- true
if sockets should be in client modeboolean isClientAuthModeNone()
SSLSocket.getUseClientMode
).
true
if client authentication should be disabled.boolean isClientAuthModeWant()
SSLSocket.getUseClientMode
).
true
if client authentication should be enabled but isn't required.boolean isClientAuthModeNeed()
SSLSocket.getUseClientMode
).
true
if client authentication is requiredjava.lang.String getClientAuthMode()
SSLSocket.getUseClientMode
).
If not set, SSLSocketBuilder.CLIENT_AUTH_MODE_NONE
is returned.
SSLSocketBuilder.CLIENT_AUTH_MODE_NONE
,
SSLSocketBuilder.CLIENT_AUTH_MODE_WANT
,
SSLSocketBuilder.CLIENT_AUTH_MODE_NEED
void setClientAuthMode(java.lang.String mode)
SSLSocket.getUseClientMode
).
If mode
is invalid or null
, will default to
SSLSocketBuilder.CLIENT_AUTH_MODE_NONE
.
mode
- client auth modeSSLSocketBuilder.CLIENT_AUTH_MODE_NONE
,
SSLSocketBuilder.CLIENT_AUTH_MODE_WANT
,
SSLSocketBuilder.CLIENT_AUTH_MODE_NEED
boolean isServerAuthMode()
void setServerAuthMode(boolean mode)
mode
- server auth modejava.lang.Object clone()
void create() throws java.lang.Exception
java.lang.Exception
void start() throws java.lang.Exception
java.lang.Exception
void stop()
void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |