예제 #1
0
 private boolean exitAfterHandlingStatus(
     Channel channel,
     NettyResponseFuture<?> future,
     HttpResponse response,
     AsyncHandler<?> handler,
     NettyResponseStatus status,
     HttpRequest httpRequest)
     throws IOException, Exception {
   return !future.getAndSetStatusReceived(true)
       && handler.onStatusReceived(status) != State.CONTINUE;
 }
예제 #2
0
 private boolean handleHanderAndExit(
     Channel channel,
     NettyResponseFuture<?> future,
     AsyncHandler<?> handler,
     HttpResponseStatus status,
     HttpResponseHeaders responseHeaders,
     HttpResponse response)
     throws Exception {
   if (!future.getAndSetStatusReceived(true)
       && (handler.onStatusReceived(status) != STATE.CONTINUE
           || handler.onHeadersReceived(responseHeaders) != STATE.CONTINUE)) {
     finishUpdate(future, channel, HttpHeaders.isTransferEncodingChunked(response));
     return true;
   }
   return false;
 }