private void  writeObject(ObjectOutputStream stream) throws IOException {
    stream.defaultWriteObject();
    stream.writeObject(name);
    stream.writeObject(state.toString());
    stream.writeObject(exception);
  }