THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Made at ApacheCon EU 2009, Robert, Martijn, Felix and Marcel produced the following design on the flipover:
Service design
Basically, we need two services:
- The serialization service, that can serialize and deserialize an object graph to an output or input stream.
- 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).