@Override
public SimpleResponse testLargePostQA(RequestContext ctx, LargeRequest message, TimeConstraints timeConstraints)
throws SimpleException {
ctx.trace("Starting large post with array size %s", message.getSize());
ctx.setRequestLogExtension(new BaselineLogExtension(message.getOddOrEven(), "largepostQA", message.getSize()));
SimpleResponse response = new SimpleResponse();
Boolean returnList = message.getReturnList();
if ((returnList != null) && (returnList)) {
List<ComplexObject> complexObjects = message.getObjects();
StringBuffer namesBuff = new StringBuffer();
namesBuff.append("Names: ");
StringBuffer value1sBuff = new StringBuffer();
value1sBuff.append("Value1s: ");
StringBuffer value2sBuff = new StringBuffer();
value2sBuff.append("Value2s: ");
for (ComplexObject complexObject: complexObjects) {
if (complexObject == null) {
namesBuff.append("null");
value1sBuff.append("null");
value2sBuff.append("null");
} else {
namesBuff.append(complexObject.getName());
value1sBuff.append(complexObject.getValue1());
value2sBuff.append( complexObject.getValue2());
}
}
String names = namesBuff.toString();
String value1s = value1sBuff.toString();
String value2s = value2sBuff.toString();
response.setMessage(names + " - " + value1s + " - " + value2s);
} else {
response.setMessage("There were " + message.getSize()
+ " items specified in the list, "
+ message.getObjects().size() + " actually");
}
return response;
}