Package org.opensaml.xmlsec.keyinfo
Interface KeyInfoGeneratorFactory
- All Known Implementing Classes:
BasicKeyInfoGeneratorFactory
,KeyAgreementKeyInfoGeneratorFactory
,X509KeyInfoGeneratorFactory
public interface KeyInfoGeneratorFactory
Interface for factories which produce
KeyInfoGenerator
instances.-
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Credential>
Get the type (interface) of the specific type of credential handled by generators produced by this factory.boolean
handles
(Credential credential) Check whether the generators produced by this factory can handle the specified credential.Get a new instance of the generator type produced by the factory.default KeyInfoGenerator
newInstance
(Class<? extends KeyInfo> type) Get a new instance of the generator type produced by the factory, and which generatesKeyInfo
instances of the specified type, for exampleOriginatorKeyInfo
orRecipientKeyInfo
.
-
Method Details
-
newInstance
Get a new instance of the generator type produced by the factory.- Returns:
- a new KeyInfoGenerator instance
-
newInstance
Get a new instance of the generator type produced by the factory, and which generatesKeyInfo
instances of the specified type, for exampleOriginatorKeyInfo
orRecipientKeyInfo
.- Parameters:
type
- the type of element to produce. Null is interpreted as a standardKeyInfo
.- Returns:
- a new KeyInfoGenerator instance
-
handles
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
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
-