Source
Response addResponse(Response response, [Path path = null, Object parameters = null]) {
if (response._sentStreamStatus != StreamStatus.closed) {
_responses[response.rid] = response;
if (_traceCallbacks != null) {
ResponseTrace update = response.getTraceData();
for (ResponseTraceCallback callback in _traceCallbacks) {
callback(update);
}
}
} else {
if (_traceCallbacks != null) {
ResponseTrace update = response.getTraceData(''); // no logged change is needed
for (ResponseTraceCallback callback in _traceCallbacks) {
callback(update);
}
}
}
return response;
}