Package cloud.piranha.http.impl
Class DefaultHttpServerResponse
java.lang.Object
cloud.piranha.http.impl.DefaultHttpServerResponse
- All Implemented Interfaces:
HttpServerResponse
public class DefaultHttpServerResponse extends Object implements HttpServerResponse
The default implementation of HTTP Server Response.
- Author:
- Manfred Riem (mriem@manorrock.com)
-
Constructor Summary
Constructors Constructor Description DefaultHttpServerResponse(Socket socket)Constructor. -
Method Summary
Modifier and Type Method Description voidcloseResponse()StringgetHeader(String name)OutputStreamgetOutputStream()voidsetHeader(String name, String value)voidsetStatus(int status)voidwriteHeaders()voidwriteStatusLine()
-
Constructor Details
-
DefaultHttpServerResponse
Constructor.- Parameters:
socket- the socket.
-
-
Method Details
-
getHeader
- Specified by:
getHeaderin interfaceHttpServerResponse- See Also:
HttpServerResponse.getHeader(java.lang.String)
-
getOutputStream
- Specified by:
getOutputStreamin interfaceHttpServerResponse- See Also:
HttpServerResponse.getOutputStream()
-
setHeader
- Specified by:
setHeaderin interfaceHttpServerResponse- See Also:
HttpServerResponse.setHeader(java.lang.String, java.lang.String)
-
setStatus
public void setStatus(int status)- Specified by:
setStatusin interfaceHttpServerResponse- See Also:
HttpServerResponse.setStatus(int)
-
closeResponse
- Specified by:
closeResponsein interfaceHttpServerResponse- Throws:
IOException
-
writeHeaders
- Specified by:
writeHeadersin interfaceHttpServerResponse- Throws:
IOException- See Also:
HttpServerResponse.writeHeaders()
-
writeStatusLine
- Specified by:
writeStatusLinein interfaceHttpServerResponse- Throws:
IOException- See Also:
HttpServerResponse.writeStatusLine()
-