Package org.hyperledger.fabric.gateway
Interface ContractEvent
public interface ContractEvent
Event emitted by the business logic of a smart contract during execution of a transaction.
-
Method Summary
Modifier and TypeMethodDescriptionGet the identifier of the chaincode that emitted the event.getName()
Get the name of the event emitted by the contract.Optional<byte[]>
Any binary data associated with this event by the chaincode.org.hyperledger.fabric.sdk.BlockEvent.TransactionEvent
Get the transaction event that included this contract event.
-
Method Details
-
getName
String getName()Get the name of the event emitted by the contract.- Returns:
- An event name.
-
getChaincodeId
String getChaincodeId()Get the identifier of the chaincode that emitted the event.- Returns:
- A chaincode ID.
-
getTransactionEvent
org.hyperledger.fabric.sdk.BlockEvent.TransactionEvent getTransactionEvent()Get the transaction event that included this contract event.- Returns:
- The associated transaction event.
-
getPayload
Optional<byte[]> getPayload()Any binary data associated with this event by the chaincode.- Returns:
- A binary payload.
-