public class PibKeyContainer extends Object
| Constructor and Description |
|---|
PibKeyContainer(Name identityName,
PibImpl pibImpl)
Create a PibKeyContainer for an identity with identityName.
|
| Modifier and Type | Method and Description |
|---|---|
PibKey |
add(ByteBuffer key,
Name keyName)
Add a key with name keyName into the container.
|
PibKey |
get(Name keyName)
Get the key with name keyName from the container.
|
ArrayList<Name> |
getKeyNames()
Get the names of all the keys in the container.
|
HashMap<Name,PibKeyImpl> |
getKeys_()
Get the keys_ map, which should only be used for testing.
|
boolean |
isConsistent()
Check if the container is consistent with the backend storage.
|
void |
remove(Name keyName)
Remove the key with name keyName from the container, and its related
certificates.
|
int |
size()
Get the number of keys in the container.
|
public PibKeyContainer(Name identityName, PibImpl pibImpl) throws PibImpl.Error
identityName - The name of the identity, which is copied.pibImpl - The PIB backend implementation.PibImpl.Errorpublic final int size()
public final PibKey add(ByteBuffer key, Name keyName) throws PibImpl.Error, Pib.Error
key - The buffer of encoded key bytes.keyName - The name of the key, which is copied.IllegalArgumentException - if the name of the key does not match the
identity name.PibImpl.ErrorPib.Errorpublic final void remove(Name keyName) throws PibImpl.Error
keyName - The name of the key.IllegalArgumentException - if keyName does not match the identity name.PibImpl.Errorpublic final PibKey get(Name keyName) throws Pib.Error, PibImpl.Error
keyName - The name of the key.IllegalArgumentException - if keyName does not match the identity name.Pib.Error - if the key does not exist.PibImpl.Errorpublic final ArrayList<Name> getKeyNames()
public final boolean isConsistent()
throws PibImpl.Error
PibImpl.Errorpublic final HashMap<Name,PibKeyImpl> getKeys_()
Copyright © 2019. All rights reserved.