de.otto.synapse.translator.AbstractTextDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of synapse-core Show documentation
Show all versions of synapse-core Show documentation
A library used at otto.de to implement Spring Boot based event-sourcing microservices.
package de.otto.synapse.translator;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import de.otto.synapse.message.Header;
import de.otto.synapse.message.Key;
import de.otto.synapse.message.TextMessage;
import org.slf4j.Logger;
import java.io.IOException;
import java.util.Map;
import java.util.Optional;
import static de.otto.synapse.message.Header.copyOf;
import static de.otto.synapse.translator.ObjectMappers.currentObjectMapper;
import static java.util.Collections.emptyMap;
import static org.slf4j.LoggerFactory.getLogger;
public abstract class AbstractTextDecoder implements Decoder {
private static final Logger LOG = getLogger(AbstractTextDecoder.class);
private static final TypeReference