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

com.github.davidmarquis.redisq.serialization.StringPayloadSerializer Maven / Gradle / Ivy

Go to download

RedisQ - Java implementation of a reliable Pub/Sub message queue based on Redis

The newest version!
package com.github.davidmarquis.redisq.serialization;

import org.apache.commons.lang.ObjectUtils;
import org.springframework.data.redis.serializer.SerializationException;

public class StringPayloadSerializer implements PayloadSerializer {

    public String serialize(Object payload) throws SerializationException {
        return ObjectUtils.toString(payload);
    }

    @SuppressWarnings("unchecked")
    public  T deserialize(String payload, Class type) throws SerializationException {
        return (T) payload;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy