## 接口的使用
org.hyperledger.fabric.gateway.ContractEvent

- 使用ContractEvent的程序包
  程序包 | 说明
  --- | ---
  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中ContractEvent的使用

    返回变量类型为ContractEvent的类型的org.hyperledger.fabric.gateway中的方法
    限定符和类型 | 方法和说明
    --- | ---
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener)` Add a listener to receive all contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to receive contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener, String eventName)` Add a listener to receive contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Consumer<ContractEvent> listener)` Add a listener to receive all contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to receive contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Consumer<ContractEvent> listener, String eventName)` Add a listener to receive contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(long startBlock, Consumer<ContractEvent> listener)` Add a listener to replay contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(long startBlock, Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to replay contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(long startBlock, Consumer<ContractEvent> listener, String eventName)` Add a listener to replay contract events emitted by committed transactions.

    类型变量类型为ContractEvent的org.hyperledger.fabric.gateway中的方法参数
    限定符和类型 | 方法和说明
    --- | ---
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener)` Add a listener to receive all contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to receive contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Checkpointer checkpointer, Consumer<ContractEvent> listener, String eventName)` Add a listener to receive contract events emitted by committed transactions with checkpointing.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Consumer<ContractEvent> listener)` Add a listener to receive all contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to receive contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(Consumer<ContractEvent> listener, String eventName)` Add a listener to receive contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(long startBlock, Consumer<ContractEvent> listener)` Add a listener to replay contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(long startBlock, Consumer<ContractEvent> listener, Pattern eventNamePattern)` Add a listener to replay contract events emitted by committed transactions.
    `Consumer<ContractEvent>` | Contract.`addContractListener(long startBlock, Consumer<ContractEvent> listener, String eventName)` Add a listener to replay contract events emitted by committed transactions.
    `void` | Contract.`removeContractListener(Consumer<ContractEvent> listener)` Remove a previously registered contract listener.

Copyright © 2023. All rights reserved.