Package org.opensaml.xmlsec.keyinfo
Interface KeyInfoGeneratorFactory
-
public interface KeyInfoGeneratorFactoryInterface for factories which produceKeyInfoGeneratorinstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Class<? extends Credential>getCredentialType()Get the type (interface) of the specific type of credential handled by generators produced by this factory.booleanhandles(Credential credential)Check whether the generators produced by this factory can handle the specified credential.KeyInfoGeneratornewInstance()Get a new instance of the generator type produced by the factory.default KeyInfoGeneratornewInstance(Class<? extends KeyInfo> type)Get a new instance of the generator type produced by the factory, and which generatesKeyInfoinstances of the specified type, for exampleOriginatorKeyInfoorRecipientKeyInfo.
-
-
-
Method Detail
-
newInstance
@Nonnull KeyInfoGenerator newInstance()
Get a new instance of the generator type produced by the factory.- Returns:
- a new KeyInfoGenerator instance
-
newInstance
@Nonnull default KeyInfoGenerator newInstance(@Nullable Class<? extends KeyInfo> type)
Get a new instance of the generator type produced by the factory, and which generatesKeyInfoinstances of the specified type, for exampleOriginatorKeyInfoorRecipientKeyInfo.- Parameters:
type- the type of element to produce. Null is interpreted as a standardKeyInfo.- Returns:
- a new KeyInfoGenerator instance
-
handles
boolean handles(@Nonnull Credential credential)Check whether the generators produced by this factory can handle the specified credential.- Parameters:
credential- the credential to evaluate- Returns:
- true if the generators produced by this factory can handle the type of the specified credential, false otherwise
-
getCredentialType
@Nonnull Class<? extends Credential> getCredentialType()
Get the type (interface) of the specific type of credential handled by generators produced by this factory. Primarily used as an index by manager implementions such asKeyInfoGeneratorManager.- Returns:
- the specifc type of credential handled by the generators produced by this factory
-
-