
io.femo.http.drivers.server.HttpRouterHandle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http Show documentation
Show all versions of http Show documentation
An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request.
On android only asynchronous driver is supported.
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