Package org.apache.cassandra.security
Class AbstractCryptoProvider
- java.lang.Object
-
- org.apache.cassandra.security.AbstractCryptoProvider
-
- Direct Known Subclasses:
DefaultCryptoProvider
,JREProvider
public abstract class AbstractCryptoProvider extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
FAIL_ON_MISSING_PROVIDER_KEY
protected boolean
failOnMissingProvider
protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description AbstractCryptoProvider(java.util.Map<java.lang.String,java.lang.String> args)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getProperties()
Returns unmodifiable properties of this crypto providerabstract java.lang.String
getProviderClassAsString()
Returns the name of the class which installs specific provider of namegetProviderName()
.abstract java.lang.String
getProviderName()
Returns name of the provider, as returned fromProvider.getName()
void
install()
The default installation runsinstallator()
and after thatisHealthyInstallation()
.protected abstract java.lang.Runnable
installator()
Returns a runnable which installs this crypto provider.protected abstract boolean
isHealthyInstallation()
Returns boolean telling if this provider was installed properly.void
uninstall()
Uninstalls this crypto provider of namegetProviderName()
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
FAIL_ON_MISSING_PROVIDER_KEY
public static final java.lang.String FAIL_ON_MISSING_PROVIDER_KEY
- See Also:
- Constant Field Values
-
failOnMissingProvider
protected final boolean failOnMissingProvider
-
-
Method Detail
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns unmodifiable properties of this crypto provider- Returns:
- crypto provider properties
-
getProviderName
public abstract java.lang.String getProviderName()
Returns name of the provider, as returned fromProvider.getName()
- Returns:
- name of the provider
-
getProviderClassAsString
public abstract java.lang.String getProviderClassAsString()
Returns the name of the class which installs specific provider of namegetProviderName()
.- Returns:
- name of class of provider
-
installator
protected abstract java.lang.Runnable installator()
Returns a runnable which installs this crypto provider.- Returns:
- runnable which installs this provider
-
isHealthyInstallation
protected abstract boolean isHealthyInstallation() throws java.lang.Exception
Returns boolean telling if this provider was installed properly.- Returns:
true
if provider was installed properly,false
otherwise.- Throws:
java.lang.Exception
-
install
public void install() throws java.lang.Exception
The default installation runsinstallator()
and after thatisHealthyInstallation()
.If any step fails, it will not throw an exception unless the parameter
FAIL_ON_MISSING_PROVIDER_KEY
istrue
.- Throws:
java.lang.Exception
-
uninstall
public void uninstall()
Uninstalls this crypto provider of namegetProviderName()
- See Also:
Security.removeProvider(String)
-
-