Class JsonArrayValueDeserializer

java.lang.Object
kieker.common.record.io.AbstractValueDeserializer
kieker.common.record.io.JsonArrayValueDeserializer
All Implemented Interfaces:
IValueDeserializer

public class JsonArrayValueDeserializer
extends AbstractValueDeserializer
implements IValueDeserializer
Deserialize an JSON array of values.
Since:
1.15
Author:
Reiner Jung
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected JsonArrayValueDeserializer​(com.fasterxml.jackson.databind.node.ArrayNode array)
    Constructor for a serializer.
  • Method Summary

    Modifier and Type Method Description
    static JsonArrayValueDeserializer create​(com.fasterxml.jackson.databind.node.ArrayNode array)
    Factory method to create a json value deserializer.
    boolean getBoolean()
    Retrieves a boolean value from the underlying data source.
    byte getByte()
    Retrieves a byte value from the underlying data source.
    char getChar()
    Retrieves a char value from the underlying data source.
    double getDouble()
    Retrieves a double value from the underlying data source.
    <T extends java.lang.Enum<T>>
    T
    getEnumeration​(java.lang.Class<T> clazz)
    Retrieves a Enumeration value from the underlying data source.
    float getFloat()
    Retrieves a float value from the underlying data source.
    int getInt()
    Retrieves an int value from the underlying data source.
    long getLong()
    Retrieves a long value from the underlying data source.
    short getShort()
    Retrieves a short value from the underlying data source.
    java.lang.String getString()
    Retrieves a String value from the underlying data source.

    Methods inherited from class kieker.common.record.io.AbstractValueDeserializer

    enumerationValueOf

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonArrayValueDeserializer

      protected JsonArrayValueDeserializer​(com.fasterxml.jackson.databind.node.ArrayNode array)
      Constructor for a serializer.
      Parameters:
      array - input array node
  • Method Details

    • create

      public static JsonArrayValueDeserializer create​(com.fasterxml.jackson.databind.node.ArrayNode array)
      Factory method to create a json value deserializer.
      Parameters:
      array - input array node
      Returns:
      the value deserializer
    • getBoolean

      public boolean getBoolean()
      Description copied from interface: IValueDeserializer
      Retrieves a boolean value from the underlying data source.
      Specified by:
      getBoolean in interface IValueDeserializer
      Returns:
      The retrieved value
    • getByte

      public byte getByte() throws java.lang.NumberFormatException
      Description copied from interface: IValueDeserializer
      Retrieves a byte value from the underlying data source.
      Specified by:
      getByte in interface IValueDeserializer
      Returns:
      The retrieved value
      Throws:
      java.lang.NumberFormatException - on format errors
    • getChar

      public char getChar()
      Description copied from interface: IValueDeserializer
      Retrieves a char value from the underlying data source.
      Specified by:
      getChar in interface IValueDeserializer
      Returns:
      The retrieved value
    • getShort

      public short getShort() throws java.lang.NumberFormatException
      Description copied from interface: IValueDeserializer
      Retrieves a short value from the underlying data source.
      Specified by:
      getShort in interface IValueDeserializer
      Returns:
      The retrieved value
      Throws:
      java.lang.NumberFormatException - on format errors
    • getInt

      public int getInt() throws java.lang.NumberFormatException
      Description copied from interface: IValueDeserializer
      Retrieves an int value from the underlying data source.
      Specified by:
      getInt in interface IValueDeserializer
      Returns:
      The retrieved value
      Throws:
      java.lang.NumberFormatException - on format errors
    • getLong

      public long getLong() throws java.lang.NumberFormatException
      Description copied from interface: IValueDeserializer
      Retrieves a long value from the underlying data source.
      Specified by:
      getLong in interface IValueDeserializer
      Returns:
      The retrieved value
      Throws:
      java.lang.NumberFormatException - on format errors
    • getFloat

      public float getFloat() throws java.lang.NumberFormatException
      Description copied from interface: IValueDeserializer
      Retrieves a float value from the underlying data source.
      Specified by:
      getFloat in interface IValueDeserializer
      Returns:
      The retrieved value
      Throws:
      java.lang.NumberFormatException - on format errors
    • getDouble

      public double getDouble() throws java.lang.NumberFormatException
      Description copied from interface: IValueDeserializer
      Retrieves a double value from the underlying data source.
      Specified by:
      getDouble in interface IValueDeserializer
      Returns:
      The retrieved value
      Throws:
      java.lang.NumberFormatException - on format errors
    • getString

      public java.lang.String getString()
      Description copied from interface: IValueDeserializer
      Retrieves a String value from the underlying data source.
      Specified by:
      getString in interface IValueDeserializer
      Returns:
      The retrieved value
    • getEnumeration

      public <T extends java.lang.Enum<T>> T getEnumeration​(java.lang.Class<T> clazz) throws RecordInstantiationException
      Description copied from interface: IValueDeserializer
      Retrieves a Enumeration value from the underlying data source.
      Specified by:
      getEnumeration in interface IValueDeserializer
      Type Parameters:
      T - the corresponding enumeration type
      Parameters:
      clazz - enumeration type to be used
      Returns:
      The retrieved value
      Throws:
      RecordInstantiationException - in case the received ordinal does not exist in the specified enumeration type