Package org.opensaml.xmlsec.keyinfo.impl
Class KeyAgreementKeyInfoGeneratorFactory
- java.lang.Object
-
- org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
-
- org.opensaml.xmlsec.keyinfo.impl.KeyAgreementKeyInfoGeneratorFactory
-
- All Implemented Interfaces:
KeyInfoGeneratorFactory
public class KeyAgreementKeyInfoGeneratorFactory extends BasicKeyInfoGeneratorFactory
A factory implementation which produces instances ofKeyInfoGeneratorcapable of handling the information contained within anKeyAgreementCredential.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classKeyAgreementKeyInfoGeneratorFactory.KeyAgreementKeyInfoGeneratorAn implementation ofKeyInfoGeneratorcapable of handling the information contained within aKeyAgreementCredential.protected classKeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptionsOptions to be used in the production of aKeyInfofrom anKeyAgreementCredential.-
Nested classes/interfaces inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator, BasicKeyInfoGeneratorFactory.BasicOptions
-
-
Field Summary
Fields Modifier and Type Field Description private KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptionsoptionsThe set of options configured for the factory.
-
Constructor Summary
Constructors Constructor Description KeyAgreementKeyInfoGeneratorFactory()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanemitOriginatorKeyInfo()Get the option to emit the OriginatorKeyInfo element within the AgreementMethod element.booleanemitRecipientKeyInfo()Get the option to emit the RecipientKeyInfo element within the AgreementMethod element.Class<? extends Credential>getCredentialType()Get the type (interface) of the specific type of credential handled by generators produced by this factory.protected KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptionsgetOptions()Get the options of this instance.KeyInfoGeneratorManagergetOriginatorKeyInfoGeneratorManager()Get theKeyInfoGeneratorManagerinstance to use to emitOriginatorKeyInfo.KeyInfoGeneratorManagergetRecipientKeyInfoGeneratorManager()Get theKeyInfoGeneratorManagerinstance to use to emitRecipientKeyInfo.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.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.protected KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptionsnewOptions()Get a new instance to hold options.voidsetEmitOriginatorKeyInfo(boolean newValue)Set the option to emit the OriginatorKeyInfo element within the AgreementMethod element.voidsetEmitRecipientKeyInfo(boolean newValue)Set the option to emit the RecipientKeyInfo element within the AgreementMethod element.voidsetOriginatorKeyInfoGeneratorManager(KeyInfoGeneratorManager manager)Set theKeyInfoGeneratorManagerinstance to use to emitOriginatorKeyInfo.voidsetRecipientKeyInfoGeneratorManager(KeyInfoGeneratorManager manager)Set theKeyInfoGeneratorManagerinstance to use to emitRecipientKeyInfo.-
Methods inherited from class org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorFactory
emitEntityIDAsKeyName, emitKeyNames, emitPublicDEREncodedKeyValue, emitPublicKeyValue, setEmitEntityIDAsKeyName, setEmitKeyNames, setEmitPublicDEREncodedKeyValue, setEmitPublicKeyValue
-
-
-
-
Field Detail
-
options
private final KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions options
The set of options configured for the factory.
-
-
Method Detail
-
getCredentialType
@Nonnull public 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.- Specified by:
getCredentialTypein interfaceKeyInfoGeneratorFactory- Overrides:
getCredentialTypein classBasicKeyInfoGeneratorFactory- Returns:
- the specifc type of credential handled by the generators produced by this factory
-
handles
public boolean handles(@Nonnull Credential credential)Check whether the generators produced by this factory can handle the specified credential.- Specified by:
handlesin interfaceKeyInfoGeneratorFactory- Overrides:
handlesin classBasicKeyInfoGeneratorFactory- 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
-
newInstance
@Nonnull public KeyInfoGenerator newInstance()
Get a new instance of the generator type produced by the factory.- Specified by:
newInstancein interfaceKeyInfoGeneratorFactory- Overrides:
newInstancein classBasicKeyInfoGeneratorFactory- Returns:
- a new KeyInfoGenerator instance
-
newInstance
@Nonnull public 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.- Specified by:
newInstancein interfaceKeyInfoGeneratorFactory- Overrides:
newInstancein classBasicKeyInfoGeneratorFactory- Parameters:
type- the type of element to produce. Null is interpreted as a standardKeyInfo.- Returns:
- a new KeyInfoGenerator instance
-
emitOriginatorKeyInfo
public boolean emitOriginatorKeyInfo()
Get the option to emit the OriginatorKeyInfo element within the AgreementMethod element.- Returns:
- the option value
-
setEmitOriginatorKeyInfo
public void setEmitOriginatorKeyInfo(boolean newValue)
Set the option to emit the OriginatorKeyInfo element within the AgreementMethod element.- Parameters:
newValue- the new option value
-
emitRecipientKeyInfo
public boolean emitRecipientKeyInfo()
Get the option to emit the RecipientKeyInfo element within the AgreementMethod element.- Returns:
- the option value
-
setEmitRecipientKeyInfo
public void setEmitRecipientKeyInfo(boolean newValue)
Set the option to emit the RecipientKeyInfo element within the AgreementMethod element.- Parameters:
newValue- the new option value
-
getOriginatorKeyInfoGeneratorManager
public KeyInfoGeneratorManager getOriginatorKeyInfoGeneratorManager()
Get theKeyInfoGeneratorManagerinstance to use to emitOriginatorKeyInfo.- Returns:
- the manager
-
setOriginatorKeyInfoGeneratorManager
public void setOriginatorKeyInfoGeneratorManager(@Nullable KeyInfoGeneratorManager manager)Set theKeyInfoGeneratorManagerinstance to use to emitOriginatorKeyInfo.- Parameters:
manager- the manager instance
-
getRecipientKeyInfoGeneratorManager
public KeyInfoGeneratorManager getRecipientKeyInfoGeneratorManager()
Get theKeyInfoGeneratorManagerinstance to use to emitRecipientKeyInfo.- Returns:
- the manager
-
setRecipientKeyInfoGeneratorManager
public void setRecipientKeyInfoGeneratorManager(@Nullable KeyInfoGeneratorManager manager)Set theKeyInfoGeneratorManagerinstance to use to emitRecipientKeyInfo.- Parameters:
manager- the manager instance
-
getOptions
@Nonnull protected KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions getOptions()
Get the options of this instance. Used by subclass constructors to get the options built by the top-level class constructor withBasicKeyInfoGeneratorFactory.newOptions().- Overrides:
getOptionsin classBasicKeyInfoGeneratorFactory- Returns:
- the options instance
-
newOptions
@Nonnull protected KeyAgreementKeyInfoGeneratorFactory.KeyAgreementOptions newOptions()
Get a new instance to hold options. Used by the top-level superclass constructor. Subclasses MUST override to produce an instance of the appropriate subclass ofBasicKeyInfoGeneratorFactory.BasicOptions.- Overrides:
newOptionsin classBasicKeyInfoGeneratorFactory- Returns:
- a new instance of factory/generator options
-
-