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

io.femo.http.drivers.server.HttpRouterHandle Maven / Gradle / Ivy

Go to download

An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request. On android only asynchronous driver is supported.

There is a newer version: 0.0.3
Show newest version
package io.femo.http.drivers.server;

import io.femo.http.HttpHandleException;
import io.femo.http.HttpRequest;
import io.femo.http.HttpResponse;
import io.femo.http.HttpRouter;

/**
 * Created by Felix Resch on 29-Apr-16.
 */
public class HttpRouterHandle implements HttpHandle {

    private HttpRouter httpRouter;

    @Override
    public boolean matches(HttpRequest request) {
        return httpRouter.matches(request);
    }

    @Override
    public boolean handle(HttpRequest request, HttpResponse response) throws HttpHandleException {
        return httpRouter.handle(request, response);
    }

    @Override
    public void parentPath(String path) {
        httpRouter.parentPath(path);
    }

    public void setRouter(HttpRouter httpRouter) {
        this.httpRouter = httpRouter;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy