java.lang.Object
cloud.piranha.http.netty.NettyHttpServerResponse
- All Implemented Interfaces:
HttpServerResponse
The Netty implementation of HTTP Server Response.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
ConstructorDescriptionNettyHttpServerResponse
(io.netty.handler.codec.http.FullHttpResponse response) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the header.Get the header.Returns the output stream.void
Set the specified header.void
setStatus
(int status) Set the status.void
Write the headers.void
Write the status line.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cloud.piranha.http.api.HttpServerResponse
closeResponse
-
Constructor Details
-
NettyHttpServerResponse
public NettyHttpServerResponse(io.netty.handler.codec.http.FullHttpResponse response) Constructor.- Parameters:
response
- the HTTP response.
-
-
Method Details
-
addHeader
Description copied from interface:HttpServerResponse
Add the header.- Specified by:
addHeader
in interfaceHttpServerResponse
- Parameters:
name
- the name.value
- the value.
-
getHeader
Description copied from interface:HttpServerResponse
Get the header.- Specified by:
getHeader
in interfaceHttpServerResponse
- Parameters:
name
- the name.- Returns:
- the value, or null if not found.
-
getOutputStream
Description copied from interface:HttpServerResponse
Returns the output stream.- Specified by:
getOutputStream
in interfaceHttpServerResponse
- Returns:
- the output stream
-
setHeader
Description copied from interface:HttpServerResponse
Set the specified header.- Specified by:
setHeader
in interfaceHttpServerResponse
- Parameters:
name
- the header name.value
- the header value.
-
setStatus
public void setStatus(int status) Description copied from interface:HttpServerResponse
Set the status.- Specified by:
setStatus
in interfaceHttpServerResponse
- Parameters:
status
- the status.
-
writeHeaders
Description copied from interface:HttpServerResponse
Write the headers.- Specified by:
writeHeaders
in interfaceHttpServerResponse
- Throws:
IOException
- when an I/O error occurs.
-
writeStatusLine
Description copied from interface:HttpServerResponse
Write the status line.- Specified by:
writeStatusLine
in interfaceHttpServerResponse
- Throws:
IOException
- when an I/O error occurs.
-