mmhttp.server
Class ErrorResponder

java.lang.Object
  extended by mmhttp.server.ErrorResponder
All Implemented Interfaces:
Responder

public class ErrorResponder
extends java.lang.Object
implements Responder

Used in the event of an error. If a Responder should thrown an Exception, the ErrorReponder will be created to respond with a 400 error along with the message of the Exception.


Constructor Summary
ErrorResponder(java.lang.Exception e)
           
ErrorResponder(java.lang.String message)
           
 
Method Summary
static java.lang.String makeExceptionString(java.lang.Exception e)
           
 Response makeResponse(Server server, Request request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorResponder

public ErrorResponder(java.lang.Exception e)

ErrorResponder

public ErrorResponder(java.lang.String message)
Method Detail

makeResponse

public Response makeResponse(Server server,
                             Request request)
                      throws java.lang.Exception
Specified by:
makeResponse in interface Responder
Throws:
java.lang.Exception

makeExceptionString

public static java.lang.String makeExceptionString(java.lang.Exception e)


Copyright © 2009 Micah Martin. All Rights Reserved.