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

com.tinkerpop.rexster.protocol.serializer.RexProSerializer Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package com.tinkerpop.rexster.protocol.serializer;

import com.tinkerpop.rexster.protocol.msg.RexProMessage;

import java.io.IOException;

/**
 * RexPro serializer interface. Use this to implement new serializers
 *
 * @author Blake Eggleston (bdeggleston.github.com)
 */
public interface RexProSerializer {

    /**
     * Consumes a byte array and RexProMessage class and returns a RexProMessage instance
     *
     * @param bytes
     * @param messageClass
     * @param 
     * @return
     */
    public  Message deserialize(byte[] bytes, Class messageClass) throws IOException;

    /**
     * Consumes a RexProMessage and returns a byte array
     *
     * @param message
     * @param 
     * @return
     */
    public  byte[] serialize(Message message, Class messageClass) throws IOException;

    /**
     * Returns the byte uniquely identifying this serializer
     * @return
     */
    public byte getSerializerId();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy