Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Made at ApacheCon EU 2009, Robert, Martijn, Felix and Marcel produced the following design on the flipover:

Service design

Basically, we need two services:

  1. The serialization service, that can serialize and deserialize an object graph to an output or input stream.
  2. Helpers that are used to (de)serialize specific objects.
Code Block

interface SerializationService {
    void serialize(Object o, OutputStream s) throws IOException, UnknownObjectException;
    Object deserialize(InputStream s) throws IOException, UnknownObjectException;
}
Code Block

interface SerializationHelper {
    // TODO
}

We also discussed adding a special manifest header to a bundle to create a sort of declarative serialization helper. That way the bundle does not need to implement and register the service (if all of them use the same helper anyway).