public boolean isKeepAlive() { return response.isKeepAlive(); }
public boolean isKeepAlive() { return httpResponse.isKeepAlive(); }
public void finish() throws IOException { if (os != null) os.flush(); ChannelFuture future; if (isCommitted()) { // if committed this means the output stream was used. future = ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); } else { future = ctx.writeAndFlush(getEmptyHttpResponse()); } if(!isKeepAlive()) { future.addListener(ChannelFutureListener.CLOSE); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) public static void transformHeaders(NettyHttpResponse nettyResponse, HttpResponse response, ResteasyProviderFactory factory) { if(nettyResponse.isKeepAlive()) { response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE); } else { response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE); } for (Map.Entry<String, List<Object>> entry : nettyResponse.getOutputHeaders().entrySet()) { String key = entry.getKey(); for (Object value : entry.getValue()) { RuntimeDelegate.HeaderDelegate delegate = factory.getHeaderDelegate(value.getClass()); if (delegate != null) { response.headers().add(key, delegate.toString(value)); } else { response.headers().set(key, value.toString()); } } } }
if (nettyResponse.isKeepAlive())
public boolean isKeepAlive() { return response.isKeepAlive(); }
public boolean isKeepAlive() { return httpResponse.isKeepAlive(); }
public void finish() throws IOException { if (os != null) os.flush(); ChannelFuture future; if (isCommitted()) { // if committed this means the output stream was used. future = ctx.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT); } else { future = ctx.writeAndFlush(getEmptyHttpResponse()); } if(!isKeepAlive()) { future.addListener(ChannelFutureListener.CLOSE); } }
@SuppressWarnings({ "rawtypes", "unchecked" }) public static void transformHeaders(NettyHttpResponse nettyResponse, HttpResponse response, ResteasyProviderFactory factory) { if(nettyResponse.isKeepAlive()) { response.headers().set(Names.CONNECTION, Values.KEEP_ALIVE); } else { response.headers().set(Names.CONNECTION, Values.CLOSE); } for (Map.Entry<String, List<Object>> entry : nettyResponse.getOutputHeaders().entrySet()) { String key = entry.getKey(); for (Object value : entry.getValue()) { RuntimeDelegate.HeaderDelegate delegate = factory.getHeaderDelegate(value.getClass()); if (delegate != null) { response.headers().add(key, delegate.toString(value)); } else { response.headers().set(key, value.toString()); } } } }
if (nettyResponse.isKeepAlive())
response.setContent(nettyResponse.getBuffer()); if (nettyResponse.isKeepAlive()) {