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

co.com.sofka.infraestructure.bus.serialize.ErrorNotificationSerializer Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package co.com.sofka.infraestructure.bus.serialize;

import co.com.sofka.infraestructure.AbstractSerializer;
import co.com.sofka.infraestructure.bus.notification.ErrorNotification;

public final class ErrorNotificationSerializer extends AbstractSerializer {

    private static ErrorNotificationSerializer eventSerializer;

    private ErrorNotificationSerializer() {
        super();
    }


    public static synchronized ErrorNotificationSerializer instance() {
        if (eventSerializer == null) {
            eventSerializer = new ErrorNotificationSerializer();
        }
        return eventSerializer;
    }


    public ErrorNotification deserialize(String aSerialization) {
        return gson.fromJson(aSerialization, ErrorNotification.class);
    }


    public String serialize(ErrorNotification object) {
        return gson.toJson(object);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy