class FlowResponseDataDecoder implements EntityDecoder<ByteBuf, FlowTokenResponseData> {

    @Override
    public FlowTokenResponseData decode(ByteBuf source) {
        FlowTokenResponseData data = new FlowTokenResponseData();

        if (source.readableBytes() == 8) {
            data.setRemainingCount(source.readInt());
            data.setWaitInMs(source.readInt());
        }
        return data;
    }

}