Changeset 83 for trunk/src/main/java/omq/common/util/Serializers
- Timestamp:
- 07/08/13 13:29:24 (11 years ago)
- Location:
- trunk/src/main/java/omq/common/util/Serializers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/common/util/Serializers/GsonImp.java
r75 r83 15 15 import com.google.gson.JsonParser; 16 16 17 /** 18 * Json serialize implementation. It uses the Gson libraries. 19 * 20 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> 21 * 22 */ 17 23 public class GsonImp implements ISerializer { 18 24 private final Gson gson = new Gson(); -
trunk/src/main/java/omq/common/util/Serializers/ISerializer.java
r72 r83 7 7 8 8 /** 9 * An ISerializer object can serialize any kind of objects and deserialize 10 * Requests and Responses. 9 11 * 10 12 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> … … 12 14 */ 13 15 public interface ISerializer { 16 /** 17 * Serialize 18 * 19 * @param obj 20 * - object to serialize 21 * @return objectSerialized 22 * @throws SerializerException 23 * - If the serialization failed 24 */ 14 25 public byte[] serialize(Object obj) throws SerializerException; 15 26 27 /** 28 * Deserialize a Request 29 * 30 * @param bytes 31 * - serialized request 32 * @param obj 33 * - remoteObject which is receiving requests 34 * @return request 35 * @throws SerializerException 36 * - If the serialization failed 37 */ 16 38 public Request deserializeRequest(byte[] bytes, RemoteObject obj) throws SerializerException; 17 39 40 /** 41 * Deserialize a Response 42 * 43 * @param bytes 44 * serialized response 45 * @param type 46 * - return type expected 47 * @return response 48 * @throws SerializerException 49 * - If the serialization failed 50 */ 18 51 public Response deserializeResponse(byte[] bytes, Class<?> type) throws SerializerException; 19 52 } -
trunk/src/main/java/omq/common/util/Serializers/JavaImp.java
r72 r83 12 12 13 13 /** 14 * Java serialize implementation. It uses the default java serialization. 14 15 * 15 16 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> -
trunk/src/main/java/omq/common/util/Serializers/KryoImp.java
r72 r83 13 13 14 14 /** 15 * Kryo serializerimplementation. It uses the Kryo libraries. 15 16 * 16 17 * @author Sergi Toda <sergi.toda@estudiants.urv.cat>
Note: See TracChangeset
for help on using the changeset viewer.