public abstract class AbstractCredentialCallback extends Object implements ExtendedCallback
| Modifier and Type | Method and Description |
|---|---|
<C extends Credential,R> |
applyToCredential(Class<C> credentialType,
Function<C,R> function)
Apply the given function to the acquired credential, if it is set and of the given type.
|
<C extends Credential,R> |
applyToCredential(Class<C> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec,
Function<C,R> function)
Apply the given function to the acquired credential, if it is set and of the given type and algorithm.
|
<C extends Credential,R> |
applyToCredential(Class<C> credentialType,
String algorithmName,
Function<C,R> function)
Apply the given function to the acquired credential, if it is set and of the given type and algorithm.
|
String |
getAlgorithm()
Get the algorithm name, if any.
|
Credential |
getCredential()
Get the acquired credential.
|
<C extends Credential> |
getCredential(Class<C> credentialType)
Get the acquired credential, if it is set and of the given type, and if so, return the credential cast to the type.
|
<C extends Credential> |
getCredential(Class<C> credentialType,
String algorithmName)
Get the acquired credential, if it is set and of the given type and algorithm, and if so, return the credential cast to the type.
|
<C extends Credential> |
getCredential(Class<C> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Get the acquired credential, if it is set and of the given type, algorithm, and parameters, and if so, return the credential cast to the type.
|
Class<? extends Credential> |
getCredentialType()
Get the supported credential type.
|
AlgorithmParameterSpec |
getParameterSpec()
Get the parameter specification, if any.
|
boolean |
isCredentialSupported(Credential credential)
Determine whether the given credential can be set on this callback.
|
boolean |
isCredentialTypeSupported(Class<? extends Credential> credentialType)
Determine whether the given credential type is supported.
|
boolean |
isCredentialTypeSupported(Class<? extends Credential> credentialType,
String algorithmName)
Determine whether the given credential type is supported for the given algorithm name.
|
boolean |
isCredentialTypeSupported(Class<? extends Credential> credentialType,
String algorithmName,
AlgorithmParameterSpec parameterSpec)
Determine whether the given credential type is supported for the given algorithm name.
|
boolean |
needsInformation()
Determine if this callback is requesting information.
|
void |
setCredential(Credential credential)
Set the credential.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOptionalpublic Credential getCredential()
null if it wasn't set yet.public <C extends Credential> C getCredential(Class<C> credentialType)
C - the credential typecredentialType - the credential type class (must not be null)null if the criteria wasn't metpublic <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName)
C - the credential typecredentialType - the credential type class (must not be null)algorithmName - the algorithm namenull if the criteria are not metpublic <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
C - the credential typecredentialType - the credential type class (must not be null)algorithmName - the algorithm nameparameterSpec - the parameter specification to match, or null if any parameters are allowed or parameters are not used by
the credential typenull if the criteria are not metpublic <C extends Credential,R> R applyToCredential(Class<C> credentialType, Function<C,R> function)
C - the credential typeR - the return typecredentialType - the credential type class (must not be null)function - the function to apply (must not be null)null if the criteria are not metpublic <C extends Credential,R> R applyToCredential(Class<C> credentialType, String algorithmName, Function<C,R> function)
C - the credential typeR - the return typecredentialType - the credential type class (must not be null)algorithmName - the algorithm namefunction - the function to apply (must not be null)null if the criteria are not metpublic <C extends Credential,R> R applyToCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec, Function<C,R> function)
C - the credential typeR - the return typecredentialType - the credential type class (must not be null)algorithmName - the algorithm nameparameterSpec - the parameter specification to match, or null if any parameters are allowed or parameters are not used by
the credential typefunction - the function to apply (must not be null)null if the criteria are not metpublic void setCredential(Credential credential)
credential - the credential, or null to indicate that no credential is availableIllegalArgumentException - if the given credential is not supportedpublic boolean isCredentialTypeSupported(Class<? extends Credential> credentialType)
false if the credential type requires
an algorithm name; in this case, use isCredentialTypeSupported(Class, String) instead.credentialType - the credential type (must not be null)true if the credential type is supported, false otherwisepublic boolean isCredentialTypeSupported(Class<? extends Credential> credentialType, String algorithmName)
credentialType - the credential type (must not be null)algorithmName - the algorithm name, or null to indicate that no algorithm name will be availabletrue if the credential type is supported, false otherwisepublic boolean isCredentialTypeSupported(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
credentialType - the credential type (must not be null)algorithmName - the algorithm name, or null to indicate that no algorithm name will be availableparameterSpec - the parameters, or null if no parameters are present in the credentialtrue if the credential type is supported, false otherwisepublic boolean isCredentialSupported(Credential credential)
credential - the credential (must not be null)true if the credential matches the type and optional algorithm of this callback, false otherwisepublic Class<? extends Credential> getCredentialType()
null)public String getAlgorithm()
null if any algorithm is suitable or the credential
type does not use algorithm namespublic AlgorithmParameterSpec getParameterSpec()
null if any parameters are suitable or the credential type
does not use parameterspublic boolean needsInformation()
ExtendedCallbackneedsInformation in interface ExtendedCallbacktrue if the callback is requesting information, false if it is only providing informationCopyright © 2018 JBoss by Red Hat. All rights reserved.