Package org.hyperledger.fabric.gateway
Class Wallets
- java.lang.Object
-
- org.hyperledger.fabric.gateway.Wallets
-
public final class Wallets extends java.lang.ObjectFactory methods for creating wallets to hold identity information, using various backing stores.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WalletnewCouchDBWallet(java.net.URL serverUrl, java.lang.String databaseName)Create a wallet backed by a CouchDB database.static WalletnewFileSystemWallet(java.nio.file.Path storeDirectory)Create a wallet backed by a directory on the file system.static WalletnewInMemoryWallet()Create a wallet backed by an in-memory (non-persistent) store.static WalletnewWallet(WalletStore store)Create a wallet backed by a custom store implementation.
-
-
-
Method Detail
-
newInMemoryWallet
public static Wallet newInMemoryWallet()
Create a wallet backed by an in-memory (non-persistent) store. Each wallet instance created will have its own private in-memory store.- Returns:
- A wallet.
-
newFileSystemWallet
public static Wallet newFileSystemWallet(java.nio.file.Path storeDirectory) throws java.io.IOException
Create a wallet backed by a directory on the file system.- Parameters:
storeDirectory- A directory.- Returns:
- A wallet.
- Throws:
java.io.IOException- if the specified directory does not exist and can not be created.
-
newCouchDBWallet
public static Wallet newCouchDBWallet(java.net.URL serverUrl, java.lang.String databaseName)
Create a wallet backed by a CouchDB database.- Parameters:
serverUrl- Connection URL for CouchDB server.databaseName- Wallet database name.- Returns:
- A wallet.
-
newWallet
public static Wallet newWallet(WalletStore store)
Create a wallet backed by a custom store implementation.- Parameters:
store- A wallet store implementation.- Returns:
- A wallet.
-
-