org.opensaml.xml.encryption
Class ChainingEncryptedKeyResolver.ChainingIterator

java.lang.Object
  extended by org.opensaml.xml.encryption.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
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  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
ChainingEncryptedKeyResolver.ChainingIterator(ChainingEncryptedKeyResolver resolver, EncryptedData encData)
          Constructor.
 
Method Summary
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
 

Field Detail

log

private final Logger log
Class logger.


parent

private ChainingEncryptedKeyResolver parent
The chaining encrypted key resolver which owns this instance.


encryptedData

private EncryptedData encryptedData
The EncryptedData context for resolution.


resolverIterator

private 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

ChainingEncryptedKeyResolver.ChainingIterator

public ChainingEncryptedKeyResolver.ChainingIterator(ChainingEncryptedKeyResolver resolver,
                                                     EncryptedData encData)
Constructor.

Parameters:
resolver - the ChainingEncryptedKeyResolver parent
encData - the EncryptedData context for resolution
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<EncryptedKey>

next

public EncryptedKey next()

Specified by:
next in interface Iterator<EncryptedKey>

remove

public void remove()

Specified by:
remove in interface Iterator<EncryptedKey>

getNextKeyIterator

private Iterator<EncryptedKey> getNextKeyIterator()
Get the iterator from the next resolver in the chain.

Returns:
an iterator of encrypted keys

getNextKey

private EncryptedKey getNextKey()
Get the next encrypted key that will be returned by this iterator.

Returns:
the next encrypted key to return


Copyright © 1999-2013. All Rights Reserved.