private void notifyListeners(final HttpResponseStatus responseStatus, ChannelFuture future) {
if (requestOutcomeEventController.isHasListeners()) {
future.addListener(ignore -> {
SentResponse sentResponse = new DefaultSentResponse(new NettyHeadersBackedHeaders(responseHeaders), new DefaultStatus(responseStatus));
RequestOutcome requestOutcome = new DefaultRequestOutcome(ratpackRequest, sentResponse, stopTime);
requestOutcomeEventController.fire(requestOutcome);
});
}
}