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

com.vicrab.marshaller.json.InterfaceBinding Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package com.vicrab.marshaller.json;

import com.fasterxml.jackson.core.JsonGenerator;
import com.vicrab.event.interfaces.VicrabInterface;

import java.io.IOException;

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy