## 接口的使用
org.hyperledger.fabric.gateway.spi.CommitListener

- 使用CommitListener的程序包
  程序包 | 说明
  --- | ---
  org.hyperledger.fabric.gateway | This package provides the set of interfaces that enable a Java application to interact with a Fabric blockchain network.

- - ### org.hyperledger.fabric.gateway中CommitListener的使用

    返回CommitListener的org.hyperledger.fabric.gateway中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `CommitListener` | Network.`addCommitListener(CommitListener listener, Collection<org.hyperledger.fabric.sdk.Peer> peers, String transactionId)` Add a listener to receive transaction commit and peer disconnect events for a set of peers.

    参数类型为CommitListener的org.hyperledger.fabric.gateway中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `CommitListener` | Network.`addCommitListener(CommitListener listener, Collection<org.hyperledger.fabric.sdk.Peer> peers, String transactionId)` Add a listener to receive transaction commit and peer disconnect events for a set of peers.
    `void` | Network.`removeCommitListener(CommitListener listener)` Removes a previously added transaction commit listener.

Copyright © 2023. All rights reserved.