Class AbstractChainingCredentialResolver.CredentialIterator
java.lang.Object
org.opensaml.security.credential.impl.AbstractChainingCredentialResolver.CredentialIterator
- All Implemented Interfaces:
Iterator<Credential>
- Enclosing class:
- AbstractChainingCredentialResolver<ResolverType extends CredentialResolver>
public class AbstractChainingCredentialResolver.CredentialIterator
extends Object
implements Iterator<Credential>
Implementation of
Iterator
to be returned (indirectly) by ChainingCredentialResolver
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Iterator<Credential>
The iterator over Credential instances from the current resolver.private CriteriaSet
The criteria set on which to base resolution.private CredentialResolver
The current resolver which is returning credentials.private final org.slf4j.Logger
Logger.private Credential
The next credential that is safe to return.The chaining credential resolver which owns this instance.private Iterator<ResolverType>
The iterator over resolvers in the chain. -
Constructor Summary
ConstructorsConstructorDescriptionCredentialIterator
(AbstractChainingCredentialResolver<ResolverType> resolver, CriteriaSet criteriaSet) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate Credential
Get the next credential that will be returned by this iterator.private Iterator<Credential>
Get the iterator from the next resolver in the chain.boolean
hasNext()
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 Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
parent
The chaining credential resolver which owns this instance. -
critSet
The criteria set on which to base resolution. -
resolverIterator
The iterator over resolvers in the chain. -
credentialIterator
The iterator over Credential instances from the current resolver. -
currentResolver
The current resolver which is returning credentials. -
nextCredential
The next credential that is safe to return.
-
-
Constructor Details
-
CredentialIterator
public CredentialIterator(@Nonnull AbstractChainingCredentialResolver<ResolverType> resolver, @Nullable CriteriaSet criteriaSet) Constructor.- Parameters:
resolver
- the chaining parent of this iterablecriteriaSet
- the set of criteria which is input to the underyling resolvers
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<Credential>
-
next
- Specified by:
next
in interfaceIterator<Credential>
-
remove
public void remove()- Specified by:
remove
in interfaceIterator<Credential>
-
getNextCredentialIterator
Get the iterator from the next resolver in the chain.- Returns:
- an iterator of credentials, or null if none is available
-
getNextCredential
Get the next credential that will be returned by this iterator.- Returns:
- the next credential to return, or null if none is available
-