Interface DataConverter

  • All Known Implementing Classes:
    JsonDataConverter

    public interface DataConverter
    Used by the framework to serialize/deserialize method parameters that need to be sent over the wire.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T fromData​(byte[] content, java.lang.Class<T> valueClass, java.lang.reflect.Type valueType)
      Implements conversion of a single value.
      java.lang.Object[] fromDataArray​(byte[] content, java.lang.reflect.Type... valueType)
      Implements conversion of an array of values of different types.
      byte[] toData​(java.lang.Object... value)
      Implements conversion of a list of values.
    • Method Detail

      • toData

        byte[] toData​(java.lang.Object... value)
               throws DataConverterException
        Implements conversion of a list of values.
        Parameters:
        value - Java value to convert to String.
        Returns:
        converted value
        Throws:
        DataConverterException - if conversion of the value passed as parameter failed for any reason.
      • fromData

        <T> T fromData​(byte[] content,
                       java.lang.Class<T> valueClass,
                       java.lang.reflect.Type valueType)
                throws DataConverterException
        Implements conversion of a single value.
        Parameters:
        content - Serialized value to convert to a Java object.
        valueClass -
        valueType -
        Returns:
        converted Java object
        Throws:
        DataConverterException - if conversion of the data passed as parameter failed for any reason.
      • fromDataArray

        java.lang.Object[] fromDataArray​(byte[] content,
                                         java.lang.reflect.Type... valueType)
                                  throws DataConverterException
        Implements conversion of an array of values of different types. Useful for deserializing arguments of function invocations.
        Parameters:
        content - serialized value to convert to Java objects.
        Returns:
        array of converted Java objects
        Throws:
        DataConverterException - if conversion of the data passed as parameter failed for any reason.