com.faunos.util.net.http
Class NotFoundStage
java.lang.Object
com.faunos.util.net.http.ResponseHeaderStage
com.faunos.util.net.http.NotFoundStage
- All Implemented Interfaces:
- Handlet, Stagelet
public class NotFoundStage
- extends ResponseHeaderStage
Simple 404 Not Found response.
- Author:
- Babak Farhang
Constructor Summary |
NotFoundStage(boolean close,
boolean head)
Creates a new instance. |
Methods inherited from class com.faunos.util.net.http.ResponseHeaderStage |
commit, discard, init, lock, read, setAllowGetHead, setConnectionClose, setContentBase, setContentLength, setContentLocation, setContentType, setContentType, setContentTypeAppOctet, setContentTypeHtml, setContentTypePlainText, setLocation, setProperty, setServer, setServer, setStatusBadRequest400, setStatusMethodNotAllowed405, setStatusNotFound404, setStatusNotImplemented501, setStatusOkay200, setStatusRequestTooLong414, setStatusServerError500, state, unwind, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotFoundStage
public NotFoundStage(boolean close,
boolean head)
- Creates a new instance.
- Parameters:
close
- if true, then a "Connection: close" header is
included.head
- if true, then this is the response to an HTTP HEAD, and
no content (HTTP entity) will be written.
addContent
protected void addContent(List<ByteBuffer> response)
- Adds a plain vanilla "not-found" page.
- Overrides:
addContent
in class ResponseHeaderStage
- Parameters:
response
- the ByteBuffer contents can be added to this given list