- if (message instanceof ReadData) {
- readData((ReadData) message);
- } else if (message instanceof WriteData) {
- writeData((WriteData) message);
- } else if (message instanceof MergeData) {
- mergeData((MergeData) message);
- } else if (message instanceof DeleteData) {
- deleteData((DeleteData) message);
+ if (ReadData.SERIALIZABLE_CLASS.equals(message.getClass())) {
+ readData(ReadData.fromSerializable(message));
+ } else if (WriteData.SERIALIZABLE_CLASS.equals(message.getClass())) {
+ writeData(WriteData.fromSerializable(message, schemaContext));
+ } else if (MergeData.SERIALIZABLE_CLASS.equals(message.getClass())) {
+ mergeData(MergeData.fromSerializable(message, schemaContext));
+ } else if (DeleteData.SERIALIZABLE_CLASS.equals(message.getClass())) {
+ deleteData(DeleteData.fromSerizalizable(message));