@Override public void submitResponse(final HttpResponse response) throws IOException, HttpException { Args.notNull(response, "HTTP response"); assertNotClosed(); if (this.response != null) { throw new HttpException("Response already submitted"); } onResponseSubmitted(response); this.responseWriter.write(response); this.hasBufferedOutput = this.outbuf.hasData(); if (response.getStatusLine().getStatusCode() >= 200) { this.connMetrics.incrementResponseCount(); if (response.getEntity() != null) { this.response = response; prepareEncoder(response); } } this.session.setEvent(EventMask.WRITE); }
@Override public void submitResponse(final HttpResponse response) throws IOException, HttpException { Args.notNull(response, "HTTP response"); assertNotClosed(); if (this.response != null) { throw new HttpException("Response already submitted"); } onResponseSubmitted(response); this.responseWriter.write(response); this.hasBufferedOutput = this.outbuf.hasData(); if (response.getStatusLine().getStatusCode() >= 200) { this.connMetrics.incrementResponseCount(); if (response.getEntity() != null) { this.response = response; prepareEncoder(response); } } this.session.setEvent(EventMask.WRITE); }