public class HandlerUtils extends Object
Constructor and Description |
---|
HandlerUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
sendErrorResponse(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest,
ErrorResponseBody errorMessage,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus statusCode)
Sends the given error response and status code to the given channel.
|
static <P extends ResponseBody> |
sendResponse(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest,
P response,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus statusCode)
Sends the given response and status code to the given channel.
|
static void |
sendResponse(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest,
String message,
org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus statusCode)
Sends the given response and status code to the given channel.
|
public static <P extends ResponseBody> void sendResponse(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest, P response, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus statusCode)
P
- type of the responsechannelHandlerContext
- identifying the open channelhttpRequest
- originating http requestresponse
- which should be sentstatusCode
- of the message to sendpublic static void sendErrorResponse(org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest, ErrorResponseBody errorMessage, org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus statusCode)
channelHandlerContext
- identifying the open channelhttpRequest
- originating http requesterrorMessage
- which should be sentstatusCode
- of the message to sendpublic static void sendResponse(@Nonnull org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandlerContext channelHandlerContext, @Nonnull org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpRequest httpRequest, @Nonnull String message, @Nonnull org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus statusCode)
channelHandlerContext
- identifying the open channelhttpRequest
- originating http requestmessage
- which should be sentstatusCode
- of the message to sendCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.