org.hyperledger.fabric.gateway

## 类 Wallets

- java.lang.Object
- - org.hyperledger.fabric.gateway.Wallets

-     public final class Wallets
      extends Object

  Factory methods for creating wallets to hold identity information, using various backing stores.

- - ### 方法概要

    所有方法 静态方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `static Wallet` | `newCouchDBWallet(URL serverUrl, String databaseName)` Create a wallet backed by a CouchDB database.
    `static Wallet` | `newFileSystemWallet(Path storeDirectory)` Create a wallet backed by a directory on the file system.
    `static Wallet` | `newInMemoryWallet()` Create a wallet backed by an in-memory (non-persistent) store.
    `static Wallet` | `newWallet(WalletStore store)` Create a wallet backed by a custom store implementation.

    - ### 从类继承的方法 java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 方法详细资料

    - #### 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.
      返回:
        A wallet.

    - #### newFileSystemWallet

          public static Wallet newFileSystemWallet(Path storeDirectory)
                                            throws IOException

      Create a wallet backed by a directory on the file system.
      参数:
        `storeDirectory` - A directory.
      返回:
        A wallet.
      抛出:
        `IOException` - if the specified directory does not exist and can not be created.

    - #### newCouchDBWallet

          public static Wallet newCouchDBWallet(URL serverUrl,
                                                String databaseName)

      Create a wallet backed by a CouchDB database.
      参数:
        `serverUrl` - Connection URL for CouchDB server.
        `databaseName` - Wallet database name.
      返回:
        A wallet.

    - #### newWallet

          public static Wallet newWallet(WalletStore store)

      Create a wallet backed by a custom store implementation.
      参数:
        `store` - A wallet store implementation.
      返回:
        A wallet.

Copyright © 2023. All rights reserved.