use of com.newrelic.api.agent.ExtendedResponse in project newrelic-java-agent by newrelic.
the class CrossProcessTransactionStateImpl method writeResponseHeaders.
@Override
public void writeResponseHeaders() {
if (tx.isIgnore()) {
return;
}
Dispatcher dispatcher = tx.getDispatcher();
if (dispatcher == null) {
return;
}
try {
Response response = dispatcher.getResponse();
long contentLength = -1;
if (response instanceof ExtendedResponse) {
contentLength = ((ExtendedResponse) response).getContentLength();
} else {
contentLength = tx.getInboundHeaderState().getRequestContentLength();
}
processOutboundResponseHeaders(response, contentLength);
} catch (Throwable e) {
Agent.LOG.log(Level.FINEST, e, "Error attempting to write response headers in transaction: {0}", tx);
}
}
Aggregations