Package cloud.piranha.http.undertow
Class UndertowHttpResponse
- java.lang.Object
-
- cloud.piranha.http.undertow.UndertowHttpResponse
-
- All Implemented Interfaces:
HttpServerResponse
public class UndertowHttpResponse extends Object implements HttpServerResponse
The Undertow WebApplicationRequest.- Author:
- Manfred Riem ([email protected])
-
-
Constructor Summary
Constructors Constructor Description UndertowHttpResponse(io.undertow.server.HttpServerExchange exchange)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHeader(String name)
Get the header.OutputStream
getOutputStream()
Get the output stream.void
setHeader(String name, String value)
Set the header.void
setStatus(int status)
Set the status.void
writeHeaders()
Write the headers.void
writeStatusLine()
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
-
-
-
-
Method Detail
-
getHeader
public String getHeader(String name)
Get the header.- Specified by:
getHeader
in interfaceHttpServerResponse
- Parameters:
name
- the name of the header.- Returns:
- the value, or null if not found.
-
getOutputStream
public OutputStream getOutputStream()
Get the output stream.- Specified by:
getOutputStream
in interfaceHttpServerResponse
- Returns:
- the output stream.
-
setHeader
public void setHeader(String name, String value)
Set the header.- Specified by:
setHeader
in interfaceHttpServerResponse
- Parameters:
name
- the name.value
- the value.
-
setStatus
public void setStatus(int status)
Set the status.- Specified by:
setStatus
in interfaceHttpServerResponse
- Parameters:
status
- the status.
-
writeHeaders
public void writeHeaders() throws IOException
Write the headers.- Specified by:
writeHeaders
in interfaceHttpServerResponse
- Throws:
IOException
- when an I/O error occurs.
-
writeStatusLine
public void writeStatusLine() throws IOException
Write the status line.- Specified by:
writeStatusLine
in interfaceHttpServerResponse
- Throws:
IOException
- when an I/O error occurs.
-
-