com.faunos.util.net.http
Class NotFoundStage

java.lang.Object
  extended by com.faunos.util.net.http.ResponseHeaderStage
      extended by com.faunos.util.net.http.NotFoundStage
All Implemented Interfaces:
Handlet, Stagelet

public class NotFoundStage
extends ResponseHeaderStage

Simple 404 Not Found response.

Author:
Babak Farhang

Field Summary
 
Fields inherited from class com.faunos.util.net.http.ResponseHeaderStage
DEFAULT_SERVER_NAME, HEADERS, responseHeaders
 
Constructor Summary
NotFoundStage(boolean close, boolean head)
          Creates a new instance.
 
Method Summary
protected  void addContent(List<ByteBuffer> response)
          Adds a plain vanilla "not-found" page.
 
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
 

Constructor Detail

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.
Method Detail

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


SourceForge.net Logo