Class NettyHttpResponse
java.lang.Object
org.jboss.resteasy.plugins.server.netty.NettyHttpResponse
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HttpResponse
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Constructor Summary
ConstructorDescriptionNettyHttpResponse
(io.netty.channel.ChannelHandlerContext ctx, boolean keepAlive, ResteasyProviderFactory providerFactory) NettyHttpResponse
(io.netty.channel.ChannelHandlerContext ctx, boolean keepAlive, ResteasyProviderFactory providerFactory, io.netty.handler.codec.http.HttpMethod method) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewCookie
(jakarta.ws.rs.core.NewCookie cookie) void
finish()
void
io.netty.handler.codec.http.DefaultHttpResponse
io.netty.handler.codec.http.DefaultHttpResponse
int
boolean
boolean
void
void
reset()
reset status and headers.void
sendError
(int status) void
void
void
setStatus
(int status) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.resteasy.spi.HttpResponse
close, getAsyncOutputStream, setSuppressExceptionDuringChunkedTransfer, suppressExceptionDuringChunkedTransfer
-
Constructor Details
-
NettyHttpResponse
public NettyHttpResponse(io.netty.channel.ChannelHandlerContext ctx, boolean keepAlive, ResteasyProviderFactory providerFactory) -
NettyHttpResponse
public NettyHttpResponse(io.netty.channel.ChannelHandlerContext ctx, boolean keepAlive, ResteasyProviderFactory providerFactory, io.netty.handler.codec.http.HttpMethod method)
-
-
Method Details
-
setOutputStream
- Specified by:
setOutputStream
in interfaceHttpResponse
-
getStatus
public int getStatus()- Specified by:
getStatus
in interfaceHttpResponse
-
setStatus
public void setStatus(int status) - Specified by:
setStatus
in interfaceHttpResponse
-
getOutputHeaders
- Specified by:
getOutputHeaders
in interfaceHttpResponse
-
getOutputStream
- Specified by:
getOutputStream
in interfaceHttpResponse
- Throws:
IOException
-
addNewCookie
public void addNewCookie(jakarta.ws.rs.core.NewCookie cookie) - Specified by:
addNewCookie
in interfaceHttpResponse
-
sendError
- Specified by:
sendError
in interfaceHttpResponse
- Throws:
IOException
-
sendError
- Specified by:
sendError
in interfaceHttpResponse
- Throws:
IOException
-
isCommitted
public boolean isCommitted()- Specified by:
isCommitted
in interfaceHttpResponse
-
reset
public void reset()Description copied from interface:HttpResponse
reset status and headers. Will fail if response is committed- Specified by:
reset
in interfaceHttpResponse
-
isKeepAlive
public boolean isKeepAlive() -
getDefaultHttpResponse
public io.netty.handler.codec.http.DefaultHttpResponse getDefaultHttpResponse() -
getEmptyHttpResponse
public io.netty.handler.codec.http.DefaultHttpResponse getEmptyHttpResponse() -
prepareChunkStream
public void prepareChunkStream() -
finish
- Throws:
IOException
-
flushBuffer
- Specified by:
flushBuffer
in interfaceHttpResponse
- Throws:
IOException
-