use of com.yahoo.jrt.Int32Array in project vespa by vespa-engine.
the class RPCSendV1 method createResponse.
@Override
protected void createResponse(Values ret, Reply reply, Version version, byte[] payload) {
int[] eCodes = new int[reply.getNumErrors()];
String[] eMessages = new String[reply.getNumErrors()];
String[] eServices = new String[reply.getNumErrors()];
for (int i = 0; i < reply.getNumErrors(); ++i) {
Error error = reply.getError(i);
eCodes[i] = error.getCode();
eMessages[i] = error.getMessage();
eServices[i] = error.getService() != null ? error.getService() : "";
}
ret.add(new StringValue(version.toString()));
ret.add(new DoubleValue(reply.getRetryDelay()));
ret.add(new Int32Array(eCodes));
ret.add(new StringArray(eMessages));
ret.add(new StringArray(eServices));
ret.add(new StringValue(reply.getProtocol()));
ret.add(new DataValue(payload));
ret.add(new StringValue(reply.getTrace().getRoot() != null ? reply.getTrace().getRoot().encode() : ""));
}
Aggregations