org.hyperledger.fabric.gateway

## 接口 ContractEvent

-     public interface ContractEvent

  Event emitted by the business logic of a smart contract during execution of a transaction.

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `getChaincodeId()` Get the identifier of the chaincode that emitted the event.
    `String` | `getName()` Get the name of the event emitted by the contract.
    `Optional<byte[]>` | `getPayload()` Any binary data associated with this event by the chaincode.
    `org.hyperledger.fabric.sdk.BlockEvent.TransactionEvent` | `getTransactionEvent()` Get the transaction event that included this contract event.

- - ### 方法详细资料

    - #### getName

          String getName()

      Get the name of the event emitted by the contract.
      返回:
        An event name.

    - #### getChaincodeId

          String getChaincodeId()

      Get the identifier of the chaincode that emitted the event.
      返回:
        A chaincode ID.

    - #### getTransactionEvent

          org.hyperledger.fabric.sdk.BlockEvent.TransactionEvent getTransactionEvent()

      Get the transaction event that included this contract event.
      返回:
        The associated transaction event.

    - #### getPayload

          Optional<byte[]> getPayload()

      Any binary data associated with this event by the chaincode.
      返回:
        A binary payload.

Copyright © 2023. All rights reserved.