package org.wikiwebserver.handler.http.interfaces;

import java.io.IOException;

import org.wikiwebserver.handler.http.HTTPHandler;

/**
 * A class implementing HTTPResponder can generate dynamic content suitable
 * for responding to a request made by a web browser.
 * 
 * The single method, respond, is responsible for either writing a response
 * to the HTTPConnection using an HTTPOutputStream or returning an Object 
 * to be automatically written to the connection.
 * 
 * A request for /page/example/HelloWorld.class causes an instance
 * of the class page.example.HelloWorld to be created and the respond 
 * method will be used to respond to the request.
 * 
 * @author Dr Michael Gardiner
 *
 */
public interface HTTPResponder {
    public Object respond(HTTPHandler conn) throws IOException;
}

