1 package com.github.celldynamics.quimp.filesystem; 2 3 /** 4 * Interface that is required by Serializer class. 5 * 6 * <p>Serializer class calls methods from this interface before and after serialization. The main 7 * purpose of these method is to allow to rebuild objects after restoration or to prepare them 8 * before saving. 9 * 10 * @author p.baniukiewicz 11 * 12 */ 13 public interface IQuimpSerialize { 14 /** 15 * This method is called just before JSON is generated. 16 * 17 * @see com.github.celldynamics.quimp.Serializer#save(String) 18 */ 19 public void beforeSerialize(); 20 21 /** 22 * This method is called after restoring object from JSON but before returning the object. 23 * 24 * @throws Exception from wrapped object in any problem. This is implementation dependent 25 * @see com.github.celldynamics.quimp.Serializer#load(String) 26 */ 27 public void afterSerialize() throws Exception; 28 29 }