public abstract class SmartContractEventListener extends Object implements TronEventHandler
| Constructor and Description |
|---|
SmartContractEventListener(TronAddress contractAddress,
Protocol.SmartContract.ABI contractABI)
Creates a new instance of SmartContractEventListener
|
| Modifier and Type | Method and Description |
|---|---|
TronSmartContract |
getContract() |
void |
handleBlock(TronClient client,
TronBlock block)
Handles a block.
|
abstract void |
handleEvent(String eventName,
String eventSignature,
Map<String,String> types,
Map<String,Object> values)
Handles a contract event.
|
abstract void |
handleNotInterpretableEvent(TronTransactionInformation.Log event)
handles an event that cannot be interpreted bases on the contract ABI.
|
void |
handleTransaction(TronClient client,
TronTransaction tx,
TronTransactionInformation info)
Handles a transaction.
|
public SmartContractEventListener(TronAddress contractAddress, Protocol.SmartContract.ABI contractABI)
contractAddress - The contract address.contractABI - The contract name.public TronSmartContract getContract()
public abstract void handleEvent(String eventName, String eventSignature, Map<String,String> types, Map<String,Object> values)
eventName - Event name.eventSignature - Event signature.types - Mapping parameter names to types.values - Mapping parameter names to values.public abstract void handleNotInterpretableEvent(TronTransactionInformation.Log event)
event - the event data.public void handleBlock(TronClient client, TronBlock block)
TronEventHandlerhandleBlock in interface TronEventHandlerclient - The client that got the block.block - The block.public void handleTransaction(TronClient client, TronTransaction tx, TronTransactionInformation info)
TronEventHandlerhandleTransaction in interface TronEventHandlerclient - The client that received the transaction.tx - The transaction.info - The transaction information.Copyright © 2020. All rights reserved.