2 つのデータ型 (Object と Long) を含む InputBuffer を受け取る IOBuffer があります。これら 2 つのデータ型を一緒に読み取ることはできません。
protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception
{
String cName = (String)in.getObject();
HashMap<String, Long> backupControllers = (HashMap<String, Long>)in.getObject();
long controllerCapacity = in.getLong();
controllerInfo request = new controllerInfo(cName, backupControllers, controllerCapacity); // this is object data type
long controllerCurrentLoad = in.getLong(); //this is long data type
request.setControllerLoad(controllerCurrentLoad);
out.write(request);
return false;
}
関数が機能せず、バッファを読み取ることができません。