ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
reader.prepareToRead(message);
return (T) reader.readObject();
}
catch (RuntimeException e) {
throw new SerializationException(e);
}
}
else if (getMode() == SerialMode.DE_RPC) {
try {
SerializationStreamReader reader = ClientWriterFactory.createReader(message);
return (T) reader.readObject();
}
catch (RuntimeException e) {
throw new SerializationException(e);
}
} else if (getMode() == SerialMode.PLAIN) {
return (T) message;
} else {
throw new UnsupportedOperationException("Not implemented yet");