package omq.common.util.Serializers;

import omq.common.event.Event;
import omq.common.message.Request;
import omq.common.message.Response;
import omq.exception.SerializerException;
import omq.server.RemoteObject;

/**
 * 
 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
 * 
 */
public interface ISerializer {
	public byte[] serialize(Object obj) throws SerializerException;

	public Request deserializeRequest(byte[] bytes, RemoteObject obj) throws SerializerException;

	public Response deserializeResponse(byte[] bytes, Class<?> type) throws SerializerException;

	public Event deserializeEvent(byte[] bytes) throws SerializerException;
}
