Java Code Examples for org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpHeaders#isKeepAlive()
The following examples show how to use
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpHeaders#isKeepAlive() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KeepAliveWrite.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public static ChannelFuture flush(ChannelHandlerContext ctx, HttpRequest request, HttpResponse response) { if (!HttpHeaders.isKeepAlive(request)) { return ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE); } else { response.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); return ctx.writeAndFlush(response); } }
Example 2
Source File: KeepAliveWrite.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
public static ChannelFuture flush(Channel ch, HttpRequest req, HttpResponse res) { if (!HttpHeaders.isKeepAlive(req)) { return ch.writeAndFlush(res).addListener(ChannelFutureListener.CLOSE); } else { res.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); return ch.writeAndFlush(res); } }
Example 3
Source File: KeepAliveWrite.java From flink with Apache License 2.0 | 5 votes |
public static ChannelFuture flush(ChannelHandlerContext ctx, HttpRequest request, HttpResponse response) { if (!HttpHeaders.isKeepAlive(request)) { return ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE); } else { response.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); return ctx.writeAndFlush(response); } }
Example 4
Source File: KeepAliveWrite.java From flink with Apache License 2.0 | 5 votes |
public static ChannelFuture flush(Channel ch, HttpRequest req, HttpResponse res) { if (!HttpHeaders.isKeepAlive(req)) { return ch.writeAndFlush(res).addListener(ChannelFutureListener.CLOSE); } else { res.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); return ch.writeAndFlush(res); } }
Example 5
Source File: KeepAliveWrite.java From flink with Apache License 2.0 | 5 votes |
public static ChannelFuture flush(ChannelHandlerContext ctx, HttpRequest request, HttpResponse response) { if (!HttpHeaders.isKeepAlive(request)) { return ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE); } else { response.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); return ctx.writeAndFlush(response); } }
Example 6
Source File: KeepAliveWrite.java From flink with Apache License 2.0 | 5 votes |
public static ChannelFuture flush(Channel ch, HttpRequest req, HttpResponse res) { if (!HttpHeaders.isKeepAlive(req)) { return ch.writeAndFlush(res).addListener(ChannelFutureListener.CLOSE); } else { res.headers().set(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE); return ch.writeAndFlush(res); } }