Interface HttpRequestContext.HttpResponseFactory
-
- Enclosing interface:
- HttpRequestContext
public static interface HttpRequestContext.HttpResponseFactoryA factory to createHttpResponses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description io.netty.handler.codec.http.HttpResponsecreate(io.netty.handler.codec.http.HttpResponseStatus status)Creates a newHttpResponseinstance with the specified status.io.netty.handler.codec.http.FullHttpResponsecreateFull(io.netty.handler.codec.http.HttpResponseStatus status)Creates a newFullHttpResponseinstance with the specified status andEMPTYcontent.io.netty.handler.codec.http.FullHttpResponsecreateFull(io.netty.handler.codec.http.HttpResponseStatus status, io.netty.buffer.ByteBuf content, int contentLength, java.lang.CharSequence contentType)Creates a newFullHttpResponseinstance with the specified status and content.default io.netty.handler.codec.http.FullHttpResponsecreateFull(io.netty.handler.codec.http.HttpResponseStatus status, io.netty.buffer.ByteBuf content, java.lang.CharSequence contentType)Creates a newFullHttpResponseinstance with the specified status and content.default io.netty.handler.codec.http.FullHttpResponsecreateFullText(io.netty.handler.codec.http.HttpResponseStatus status)Creates a newFullHttpResponseinstance with the specified status and the content be same with status astext/plain.io.netty.handler.codec.http.FullHttpResponsecreateFullText(io.netty.handler.codec.http.HttpResponseStatus status, java.nio.charset.Charset charset)Creates a newFullHttpResponseinstance with the specified status and the content be same with status astext/plain.
-
-
-
Method Detail
-
create
io.netty.handler.codec.http.HttpResponse create(io.netty.handler.codec.http.HttpResponseStatus status)
Creates a newHttpResponseinstance with the specified status.- Parameters:
status- the status- Returns:
- a
HttpResponse
-
createFull
io.netty.handler.codec.http.FullHttpResponse createFull(io.netty.handler.codec.http.HttpResponseStatus status)
Creates a newFullHttpResponseinstance with the specified status andEMPTYcontent.- Parameters:
status- the status- Returns:
- a
FullHttpResponse
-
createFull
default io.netty.handler.codec.http.FullHttpResponse createFull(io.netty.handler.codec.http.HttpResponseStatus status, io.netty.buffer.ByteBuf content, java.lang.CharSequence contentType)Creates a newFullHttpResponseinstance with the specified status and content.- Parameters:
status- the statuscontent- aByteBufcontains response bodycontentType- the MIME type of the content- Returns:
- a
FullHttpResponse
-
createFull
io.netty.handler.codec.http.FullHttpResponse createFull(io.netty.handler.codec.http.HttpResponseStatus status, io.netty.buffer.ByteBuf content, int contentLength, java.lang.CharSequence contentType)Creates a newFullHttpResponseinstance with the specified status and content.- Parameters:
status- the statuscontent- aByteBufcontains response bodycontentLength- the length of the contentcontentType- the MIME type of the content- Returns:
- a
FullHttpResponse
-
createFullText
default io.netty.handler.codec.http.FullHttpResponse createFullText(io.netty.handler.codec.http.HttpResponseStatus status)
Creates a newFullHttpResponseinstance with the specified status and the content be same with status astext/plain.- Parameters:
status- the status- Returns:
- a
FullHttpResponse
-
createFullText
io.netty.handler.codec.http.FullHttpResponse createFullText(io.netty.handler.codec.http.HttpResponseStatus status, java.nio.charset.Charset charset)Creates a newFullHttpResponseinstance with the specified status and the content be same with status astext/plain.- Parameters:
status- the statuscharset- the character-set of the content- Returns:
- a
FullHttpResponse
-
-