Class EventFilterOptions


  • public class EventFilterOptions
    extends java.lang.Object
    • Constructor Detail

      • EventFilterOptions

        public EventFilterOptions()
        Creates an EventFilterOptions instance.
    • 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
      • 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.