Class ChainingEncryptedKeyResolver.ChainingIterator
java.lang.Object
org.opensaml.xmlsec.encryption.support.ChainingEncryptedKeyResolver.ChainingIterator
- All Implemented Interfaces:
Iterator<EncryptedKey>
- Enclosing class:
- ChainingEncryptedKeyResolver
public class ChainingEncryptedKeyResolver.ChainingIterator
extends Object
implements Iterator<EncryptedKey>
Implementation of
Iterator to be (indirectly) returned by ChainingEncryptedKeyResolver.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EncryptedKeyResolverThe current resolver which is returning encrypted keys.private final EncryptedDataThe EncryptedData context for resolution.private Iterator<EncryptedKey>The iterator over EncryptedKey instances from the current resolver.private final org.slf4j.LoggerClass logger.private EncryptedKeyThe next encrypted key that is safe to return.private final ChainingEncryptedKeyResolverThe chaining encrypted key resolver which owns this instance.private final Iterator<EncryptedKeyResolver>The iterator over resolvers in the chain.The recipients for resolution. -
Constructor Summary
ConstructorsConstructorDescriptionChainingIterator(ChainingEncryptedKeyResolver resolver, EncryptedData encData, Set<String> recipientIDs) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate EncryptedKeyGet the next encrypted key that will be returned by this iterator.private Iterator<EncryptedKey>Get the iterator from the next resolver in the chain.booleanhasNext()next()voidremove()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
parent
The chaining encrypted key resolver which owns this instance. -
encryptedData
The EncryptedData context for resolution. -
validRecipients
The recipients for resolution. -
resolverIterator
The iterator over resolvers in the chain. -
keyIterator
The iterator over EncryptedKey instances from the current resolver. -
currentResolver
The current resolver which is returning encrypted keys. -
nextKey
The next encrypted key that is safe to return.
-
-
Constructor Details
-
ChainingIterator
public ChainingIterator(@Nonnull ChainingEncryptedKeyResolver resolver, @Nonnull EncryptedData encData, @Nullable Set<String> recipientIDs) Constructor.- Parameters:
resolver- the ChainingEncryptedKeyResolver parentencData- the EncryptedData context for resolutionrecipientIDs- the recipients for resolution
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<EncryptedKey>
-
next
- Specified by:
nextin interfaceIterator<EncryptedKey>
-
remove
public void remove()- Specified by:
removein interfaceIterator<EncryptedKey>
-
getNextKeyIterator
Get the iterator from the next resolver in the chain.- Returns:
- an iterator of encrypted keys, or null if none remain
-
getNextKey
Get the next encrypted key that will be returned by this iterator.- Returns:
- the next encrypted key to return, or null if none remain
-