Class Event

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​Codec>, Codec

    public class Event
    extends Struct
    A representation of a system event. These are generated via the Metadata interfaces and specific to a specific Substrate runtime
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Event.EventData
      Wrapper for the actual data that forms part of an Event
      static class  Event.EventIndex
      This follows the same approach as in Method, we have the `[sectionIndex, methodIndex]` pairing that indicates the actual event fired
      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      Event​(byte[] value)  
    • Method Summary

      Modifier and Type Method Description
      static java.lang.Object[] decodeEvent​(byte[] value)  
      Event.EventData getData()
      The wrapped EventData
      Event.EventIndex getIndex()
      The EventIndex, identifying the raw event
      Events.EventMetadata getMeta()
      The EventMetadata with the documentation
      java.lang.String getMethod()
      The method string identifying the event
      java.lang.String getSection()
      The section string identifying the event
      java.util.List<CreateType.TypeDef> getTypeDef()
      The TypeDef for the event
      static void injectMetadata​(MetadataV0 metadata)  
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.polkadot.types.Codec

        toU8a
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • Event

        public Event​(byte[] value)
    • Method Detail

      • decodeEvent

        public static java.lang.Object[] decodeEvent​(byte[] value)
      • injectMetadata

        public static void injectMetadata​(MetadataV0 metadata)
      • getIndex

        public Event.EventIndex getIndex()
        The EventIndex, identifying the raw event
      • getMethod

        public java.lang.String getMethod()
        The method string identifying the event
      • getSection

        public java.lang.String getSection()
        The section string identifying the event
      • getTypeDef

        public java.util.List<CreateType.TypeDef> getTypeDef()
        The TypeDef for the event