All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mite.handlers.EchoRequestHandler Maven / Gradle / Ivy

package mite.handlers;

import mite.HTTPRequest;

import java.io.IOException;

/**
 * Simple handler mostly for demonstration and debugging.
 */
public final class EchoRequestHandler
    extends AbstractRequestHandler
{

    public static EchoRequestHandler of() {
        return new EchoRequestHandler();
    }

    private EchoRequestHandler() {}

    protected String handle(HTTPRequest request) throws IOException {
        String R = "\r";
        return "" +
                  "" +
                      "
" +
                          "request =" + request          + R +
                          "method  =" + request.method   + R +
                          "filename=" + request.filename + R +
                      "
" + "" + ""; } protected boolean handles(HTTPRequest request) { return true; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy