All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.firefly.net.dataformats.Mapper Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.net.dataformats;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.ion.IonObjectMapper;
import org.msgpack.jackson.dataformat.MessagePackFactory;

/**
 * @author Pengtao Qiu
 */
abstract public class Mapper {

    private static class MessagePackMapperHolder {
        static final ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
    }

    private static class IonMapperHolder {
        static final ObjectMapper objectMapper = new IonObjectMapper();
    }

    public static ObjectMapper getMessagePackMapper() {
        return MessagePackMapperHolder.objectMapper;
    }

    public static ObjectMapper getIonMapper() {
        return IonMapperHolder.objectMapper;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy