Class HttpHandlerUtil
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.server.handler.HttpHandlerUtil
-
public class HttpHandlerUtil extends Object
Provides methods shared by the HTTP handlers.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description HttpHandlerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
sendError(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpResponseStatus status, String message)
Helper method to send errors back as JSON.
-
-
-
Method Detail
-
sendError
public static void sendError(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpResponseStatus status, String message)
Helper method to send errors back as JSON. Only to be used when the RequestMessage couldn't be parsed, because a proper serialized ResponseMessage should be sent in that case.- Parameters:
ctx
- The netty channel context.status
- The HTTP error status code.message
- The error message to contain the body.
-
-