Package edu.vt.middleware.ldap.ssl
Class CredentialConfigParser
- java.lang.Object
-
- edu.vt.middleware.ldap.ssl.CredentialConfigParser
-
public class CredentialConfigParser extends java.lang.ObjectParses the configuration data associated with credential configs and ssl socket factories. The format of the property string should be like:MySSLSocketFactory {KeyStoreCredentialConfig {{trustStore=/tmp/my.truststore}{trustStoreType=JKS}}}or
{KeyStoreCredentialConfig {{trustStore=/tmp/my.truststore}{trustStoreType=JKS}}}or
{{trustCertificates=/tmp/my.crt}}- Version:
- $Revision: 930 $ $Date: 2009-10-26 16:44:26 -0400 (Mon, 26 Oct 2009) $
- Author:
- Middleware Services
-
-
Constructor Summary
Constructors Constructor Description CredentialConfigParser(java.lang.String config)Creates a newCredentialConfigParserwith the supplied configuration string.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCredentialConfigClassName()Returns the credential config class name from the configuration.java.util.Map<java.lang.String,java.lang.String>getProperties()Returns the properties from the configuration.java.lang.StringgetSslSocketFactoryClassName()Returns the SSL socket factory class name from the configuration.java.lang.ObjectinitializeType()Initialize an instance of credential config with the properties contained in this config.static booleanisCredentialConfig(java.lang.String config)Returns whether the supplied configuration data contains a credential config.protected voidsetProperties(java.lang.Class<?> c, java.lang.Object o)Sets the properties on the supplied object.
-
-
-
Method Detail
-
getSslSocketFactoryClassName
public java.lang.String getSslSocketFactoryClassName()
Returns the SSL socket factory class name from the configuration.- Returns:
Stringclass name
-
getCredentialConfigClassName
public java.lang.String getCredentialConfigClassName()
Returns the credential config class name from the configuration.- Returns:
Stringclass name
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns the properties from the configuration.- Returns:
Mapof property name to value
-
isCredentialConfig
public static boolean isCredentialConfig(java.lang.String config)
Returns whether the supplied configuration data contains a credential config.- Parameters:
config-String- Returns:
boolean
-
initializeType
public java.lang.Object initializeType()
Initialize an instance of credential config with the properties contained in this config.- Returns:
Objectof the typeCredentialConfig
-
setProperties
protected void setProperties(java.lang.Class<?> c, java.lang.Object o)Sets the properties on the supplied object.- Parameters:
c-Classtype of the supplied objecto-Objectto invoke properties on
-
-