Interface MessagePackObjectMapper

    • Method Detail

      • toValue

        <V extends org.msgpack.value.Value,​O> V toValue​(O o)
                                                       throws MessagePackObjectMapperException
        Create MessagePack entity representation for an object.
        Type Parameters:
        V - the target MessagePack entity type
        O - the source object type
        Parameters:
        o - an object to be converted
        Returns:
        instance of MessagePack Value
        Throws:
        MessagePackObjectMapperException - if the corresponding conversion cannot be performed
      • registerObjectConverter

        <V extends org.msgpack.value.Value,​O> void registerObjectConverter​(Class<? extends O> objectClass,
                                                                                 Class<V> valueClass,
                                                                                 ObjectConverter<O,​V> converter)
        Adds a Java object converter to this mappers instance
        Type Parameters:
        V - the target MessagePack entity type
        O - the source object type
        Parameters:
        objectClass - source object class
        valueClass - target value class
        converter - entity-to-object converter
        See Also:
        ObjectConverter