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

com.netflix.suro.message.MessageContainer Maven / Gradle / Ivy

The newest version!
package com.netflix.suro.message;

import com.fasterxml.jackson.core.type.TypeReference;

/**
 * Wrapper for a message with caching for deserialization
 * 
 * @author elandau
 */
public interface MessageContainer {
    /**
     * Get the 'routing' key for this message.  Note that the routing key is not 
     * part of the message and does not require deserialization.
     * @return
     */
    public String getRoutingKey();
    
    /**
     * Deserialize the message body into the requested entity.  
     * @param clazz
     * @return
     * @throws Exception
     */
    public  T getEntity(Class clazz) throws Exception;

    public  T getEntity(TypeReference typeReference) throws Exception;
    
    /**
     * Return the raw message
     * @return
     */
    public Message getMessage();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy