Package org.hyperledger.fabric.gateway
Interface Wallet
-
public interface WalletA wallet stores identity information used to connect to a Hyperledger Fabric network. Instances are created using factory methods onWallets.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Identityget(java.lang.String label)Get an identity from the wallet.java.util.Set<java.lang.String>list()Get the labels of all identities in the wallet.voidput(java.lang.String label, Identity identity)Put an identity into the wallet.voidremove(java.lang.String label)Remove an identity from the wallet.
-
-
-
Method Detail
-
put
void put(java.lang.String label, Identity identity) throws java.io.IOExceptionPut an identity into the wallet.- Parameters:
label- Label used to identify the identity within the wallet.identity- Identity to store in the wallet.- Throws:
java.io.IOException- if an error occurs accessing the backing store.
-
get
Identity get(java.lang.String label) throws java.io.IOException
Get an identity from the wallet. The implementation class of the identity object will vary depending on its type.- Parameters:
label- Label used to identify the identity within the wallet.- Returns:
- An identity if it exists; otherwise null.
- Throws:
java.io.IOException- if an error occurs accessing the backing store.
-
list
java.util.Set<java.lang.String> list() throws java.io.IOExceptionGet the labels of all identities in the wallet.- Returns:
- Identity labels.
- Throws:
java.io.IOException- if an error occurs accessing the backing store.
-
remove
void remove(java.lang.String label) throws java.io.IOExceptionRemove an identity from the wallet. If the identity does not exist, this method does nothing.- Parameters:
label- Label used to identify the identity within the wallet.- Throws:
java.io.IOException- if an error occurs accessing the backing store.
-
-