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 ofIterator
to be (indirectly) returned byChainingEncryptedKeyResolver
.
-
-
Field Summary
Fields Modifier and Type Field Description private EncryptedKeyResolver
currentResolver
The current resolver which is returning encrypted keys.private EncryptedData
encryptedData
The EncryptedData context for resolution.private Iterator<EncryptedKey>
keyIterator
The iterator over EncryptedKey instances from the current resolver.private org.slf4j.Logger
log
Class logger.private EncryptedKey
nextKey
The next encrypted key that is safe to return.private ChainingEncryptedKeyResolver
parent
The chaining encrypted key resolver which owns this instance.private Iterator<EncryptedKeyResolver>
resolverIterator
The iterator over resolvers in the chain.
-
Constructor Summary
Constructors Constructor Description ChainingIterator(ChainingEncryptedKeyResolver resolver, EncryptedData encData)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private EncryptedKey
getNextKey()
Get the next encrypted key that will be returned by this iterator.private Iterator<EncryptedKey>
getNextKeyIterator()
Get the iterator from the next resolver in the chain.boolean
hasNext()
EncryptedKey
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
log
private final org.slf4j.Logger log
Class logger.
-
parent
private final ChainingEncryptedKeyResolver parent
The chaining encrypted key resolver which owns this instance.
-
encryptedData
private final EncryptedData encryptedData
The EncryptedData context for resolution.
-
resolverIterator
private final Iterator<EncryptedKeyResolver> resolverIterator
The iterator over resolvers in the chain.
-
keyIterator
private Iterator<EncryptedKey> keyIterator
The iterator over EncryptedKey instances from the current resolver.
-
currentResolver
private EncryptedKeyResolver currentResolver
The current resolver which is returning encrypted keys.
-
nextKey
private EncryptedKey nextKey
The next encrypted key that is safe to return.
-
-
Constructor Detail
-
ChainingIterator
public ChainingIterator(@Nonnull ChainingEncryptedKeyResolver resolver, @Nonnull EncryptedData encData)
Constructor.- Parameters:
resolver
- the ChainingEncryptedKeyResolver parentencData
- the EncryptedData context for resolution
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<EncryptedKey>
-
next
public EncryptedKey next()
- Specified by:
next
in interfaceIterator<EncryptedKey>
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<EncryptedKey>
-
getNextKeyIterator
@Nullable private Iterator<EncryptedKey> getNextKeyIterator()
Get the iterator from the next resolver in the chain.- Returns:
- an iterator of encrypted keys, or null if none remain
-
getNextKey
@Nullable private EncryptedKey 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
-
-