package com.todomvc.shared.command;
public interface CommandSerialization {
Serializes a Command object. Used for serializing on the server the commands sent to the client.
You may check this implementation.
public static interface Serializer {
String serializeCommand(Command<?> command);
}
De-serializes a Command
object. Used for de-serializing on the client the commands received from the server through the browser channel.
Check this implementation.
public interface CommandDeserializer {
public Command<?> read(String serializedCommand) throws SerializationException;
}
public static class SerializationException extends Exception {
public SerializationException(Exception cause) {
super(cause);
}
}
}