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

net.kencochrane.raven.marshaller.json.InterfaceBinding Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
package net.kencochrane.raven.marshaller.json;

import com.fasterxml.jackson.core.JsonGenerator;
import net.kencochrane.raven.event.interfaces.SentryInterface;

import java.io.IOException;

/**
 * An interface binding allows to encore a {@link SentryInterface} of a specific type into a JSON stream.
 *
 * @param  type of {@link SentryInterface} supported by the binder.
 */
public interface InterfaceBinding {
    /**
     * Encodes the content of a sentry interface into a JSON stream.
     *
     * @param generator       JSON generator allowing to write JSON content.
     * @param sentryInterface interface to encode.
     * @throws IOException thrown in case of failure during the generation of JSON content.
     */
    void writeInterface(JsonGenerator generator, T sentryInterface) throws IOException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy