Package org.polkadot.types.type
Class Event
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,Codec>
-
- org.polkadot.types.codec.Struct
-
- org.polkadot.types.type.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 classEvent.EventDataWrapper for the actual data that forms part of an Eventstatic classEvent.EventIndexThis follows the same approach as inMethod, we have the `[sectionIndex, methodIndex]` pairing that indicates the actual event fired
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,Types.ConstructorCodec<Event.EventData>>EventTypes
-
Constructor Summary
Constructors Constructor Description Event(byte[] value)
-
Method Summary
Modifier and Type Method Description static java.lang.Object[]decodeEvent(byte[] value)Event.EventDatagetData()The wrapped EventDataEvent.EventIndexgetIndex()The EventIndex, identifying the raw eventEvents.EventMetadatagetMeta()The EventMetadata with the documentationjava.lang.StringgetMethod()The method string identifying the eventjava.lang.StringgetSection()The section string identifying the eventjava.util.List<CreateType.TypeDef>getTypeDef()The TypeDef for the eventstatic voidinjectMetadata(MetadataV0 metadata)-
Methods inherited from class org.polkadot.types.codec.Struct
builder, eq, getEncodedLength, getField, isEmpty, toArray, toHex, toJson, toString, toU8a, with
-
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
-
-
-
-
Field Detail
-
EventTypes
public static final java.util.Map<java.lang.String,Types.ConstructorCodec<Event.EventData>> EventTypes
-
-
Method Detail
-
decodeEvent
public static java.lang.Object[] decodeEvent(byte[] value)
-
injectMetadata
public static void injectMetadata(MetadataV0 metadata)
-
getData
public Event.EventData getData()
The wrapped EventData
-
getIndex
public Event.EventIndex getIndex()
The EventIndex, identifying the raw event
-
getMeta
public Events.EventMetadata getMeta()
The EventMetadata with the documentation
-
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
-
-