net.adamcin.httpsig.api
Interface Keychain

All Superinterfaces:
Iterable<Key>
All Known Implementing Classes:
DefaultKeychain

public interface Keychain
extends Iterable<Key>

Immutable interface for a list of Keys


Method Summary
 Key currentKey()
           
 Keychain discard()
           
 Keychain filterAlgorithms(Collection<Algorithm> algorithms)
          Filter this keychain by a Collection of supported Algorithms
 Set<Algorithm> getAlgorithms()
           
 boolean isEmpty()
           
 Map<String,Key> toMap(KeyId keyId)
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getAlgorithms

Set<Algorithm> getAlgorithms()
Returns:
a Set containing the union of all algorithms supported by each Key in this Keychain

filterAlgorithms

Keychain filterAlgorithms(Collection<Algorithm> algorithms)
Filter this keychain by a Collection of supported Algorithms

Parameters:
algorithms -
Returns:
a new Keychain containing only those keys which support at least one of the provided algorithms

discard

Keychain discard()
Returns:
a reference to a Keychain which excludes the current Key.

currentKey

Key currentKey()
Returns:
a reference to the current Key.

toMap

Map<String,Key> toMap(KeyId keyId)
Parameters:
keyId -
Returns:
a Map where the values are the Keys and the map entry keys are the keyId's generated by the KeyId, o

isEmpty

boolean isEmpty()
Returns:
true if this Keychain has no more keys


Copyright © 2013-2014. All Rights Reserved.