public class PibIdentityImpl extends Object
| Constructor and Description |
|---|
PibIdentityImpl(Name identityName,
PibImpl pibImpl,
boolean needInit)
Create a PibIdentityImpl with identityName.
|
| Modifier and Type | Method and Description |
|---|---|
PibKey |
addKey(ByteBuffer key,
Name keyName)
Add the key.
|
PibKey |
getDefaultKey()
Get the default key of this Identity.
|
PibKey |
getKey(Name keyName)
Get the key with name keyName.
|
PibKeyContainer |
getKeys_()
Get the PibKeyContainer.
|
Name |
getName() |
void |
removeKey(Name keyName)
Remove the key with keyName and its related certificates.
|
PibKey |
setDefaultKey(ByteBuffer key,
Name keyName)
Add a key with name keyName and set it as the default key of the identity.
|
PibKey |
setDefaultKey(Name keyName)
Set the key with name keyName as the default key of the identity.
|
public PibIdentityImpl(Name identityName, PibImpl pibImpl, boolean needInit) throws PibImpl.Error, Pib.Error
identityName - The name of the identity, which is copied.pibImpl - The Pib backend implementation.needInit - If true and the identity does not exist in the pibImpl back
end, then create it (and If no default identity has been set, identityName
becomes the default). If false, then throw Pib.Error if the identity does
not exist in the pibImpl back end.Pib.Error - if the identity does not exist in the pibImpl back end
and needInit is false.PibImpl.Errorpublic final Name getName()
public final PibKey addKey(ByteBuffer key, Name keyName) throws PibImpl.Error, Pib.Error
key - The public key bits. This copies the buffer.keyName - The name of the key. This copies the name.PibImpl.ErrorPib.Errorpublic final void removeKey(Name keyName) throws PibImpl.Error
keyName - The name of the key.PibImpl.Errorpublic final PibKey getKey(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 PibKey setDefaultKey(Name keyName) throws Pib.Error, PibImpl.Error
keyName - The name of the key. This copies the name.IllegalArgumentException - if the name of the key does not match the
identity name.Pib.Error - if the key does not exist.PibImpl.Errorpublic final PibKey setDefaultKey(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.Pib.Error - if a key with the same name already exists.PibImpl.Errorpublic final PibKey getDefaultKey() throws Pib.Error, PibImpl.Error
Pib.Error - if the default key has not been set.PibImpl.Errorpublic PibKeyContainer getKeys_()
Copyright © 2019. All rights reserved.