if (packet instanceof DataRequest) {
DataRequest dataRequest = (DataRequest) packet;
logger.info(String.format("%s: detail %s", prefix, prettyPrintObjectForLogging(dataRequest.getObject())));
}
if (packet instanceof DataResponse) {
DataResponse dataResponse = (DataResponse) packet;
for (int i = 0; i < dataResponse.getObjects().size(); i++) {
Object o = dataResponse.getObjects().get(i);
logger.info(String.format("%s: detail[%d/%d] %s", prefix,
i + 1, dataResponse.getObjects().size(), prettyPrintObjectForLogging(o)));
}
}
}