mmhttp.server
Interface Responder

All Known Implementing Classes:
ErrorResponder, NotFoundResponder, UnauthorizedResponder

public interface Responder

An interface that custom Responders must implement.

A Responder is responsible for generating a Response based on a Request. For any given request, a Responder will be instantiated to respond to that request alone, then thrown to the garbage colletor. Therefor, instance variable are only useful for handling one request.

There are a few build-in Responders but, for interesting behavior, you will have to implement and register some custom Responders of your own.

Make sure your custom Responders have a default constructor. This will be used to instantiate them.

See Also:
ResponderFactory

Method Summary
 Response makeResponse(Server server, Request request)
           
 

Method Detail

makeResponse

Response makeResponse(Server server,
                      Request request)
                      throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009 Micah Martin. All Rights Reserved.