com.github.davidmarquis.redisq.serialization.StringPayloadSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redisq Show documentation
Show all versions of redisq Show documentation
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