Package com.klaytn.caver.contract
Class EventFilterOptions
- java.lang.Object
-
- com.klaytn.caver.contract.EventFilterOptions
-
public class EventFilterOptions extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventFilterOptions.IndexedParameter
-
Constructor Summary
Constructors Constructor Description EventFilterOptions()
Creates an EventFilterOptions instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List
convertsTopic(ContractEvent event, EventFilterOptions options)
Converts a filterOptions in options parameter to topic list according to the ABI spec.static java.util.List
convertsTopic(ContractEvent event, java.util.List<EventFilterOptions.IndexedParameter> filterOptions)
Converts a filterOptions to topic list according to the ABI spec.java.util.List<EventFilterOptions.IndexedParameter>
getFilterOptions()
Getter method for filterOptions.java.util.List
getTopics()
Getter method for topics.void
setFilterOptions(java.util.List<EventFilterOptions.IndexedParameter> filterOptions)
Setter method for filterOptions.void
setTopics(java.util.List topics)
Setter method for topics.void
setTopicWithFilterOptions(ContractEvent event)
Set a topic field using filterOptions field.java.util.List<Filter.FilterTopic>
toKlayFilterTopic()
Converts topics field to KlayFilterTopic type.
-
-
-
Method Detail
-
convertsTopic
public static java.util.List convertsTopic(ContractEvent event, EventFilterOptions options) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException, java.lang.IllegalAccessException
Converts a filterOptions in options parameter to topic list according to the ABI spec.- Parameters:
event
- The contract event to filter.options
- The filterOptions to filter contract event.- Returns:
- List
- Throws:
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
convertsTopic
public static java.util.List convertsTopic(ContractEvent event, java.util.List<EventFilterOptions.IndexedParameter> filterOptions) throws java.lang.ClassNotFoundException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException
Converts a filterOptions to topic list according to the ABI spec.- Parameters:
event
- The contract event to filter.filterOptions
- The list of IndexedParameter instance that consist of parameter name of indexed event parameter and its value.- Returns:
- List
- Throws:
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
setTopicWithFilterOptions
public void setTopicWithFilterOptions(ContractEvent event) throws java.lang.ClassNotFoundException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException
Set a topic field using filterOptions field.After setting a topic, the filterOptions field will be removed to provide explicit usability, the filterOptions field is removed.
- Parameters:
event
- The ContractEvent instance.- Throws:
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.InstantiationException
java.lang.IllegalAccessException
-
toKlayFilterTopic
public java.util.List<Filter.FilterTopic> toKlayFilterTopic()
Converts topics field to KlayFilterTopic type.- Returns:
- List
-
getFilterOptions
public java.util.List<EventFilterOptions.IndexedParameter> getFilterOptions()
Getter method for filterOptions.- Returns:
- List
-
getTopics
public java.util.List getTopics()
Getter method for topics.- Returns:
- List
-
setFilterOptions
public void setFilterOptions(java.util.List<EventFilterOptions.IndexedParameter> filterOptions)
Setter method for filterOptions.- Parameters:
filterOptions
- The list of contract event filter that is a human-readable option.
-
setTopics
public void setTopics(java.util.List topics)
Setter method for topics.- Parameters:
topics
- The contract event topic list.
-
-