String classname = req.getClassname();
ByteString value = req.getVal();
byte[] raw = value.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(raw);
ObjectInputStream ois = new ObjectInputStream(bais);
SenseiGenericRequest ret = new SenseiGenericRequest();
ret.setClassname(classname);
ret.setRequest((Serializable) ois.readObject());
return ret;
} catch (Exception e)
{
logger.error("serialize request", e);
}