Package spark
Interface Route
-
- All Known Implementing Classes:
ResponseTransformerRouteImpl,RouteImpl,TemplateViewRouteImpl
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RouteCreated by Per Wendel on 2014-05-10.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objecthandle(Request request, Response response)Invoked when a request is made on this route's corresponding path e.g.
-
-
-
Method Detail
-
handle
java.lang.Object handle(Request request, Response response) throws java.lang.Exception
Invoked when a request is made on this route's corresponding path e.g. '/hello'- Parameters:
request- The request object providing information about the HTTP requestresponse- The response object providing functionality for modifying the response- Returns:
- The content to be set in the response
- Throws:
java.lang.Exception- implementation can choose to throw exception
-
-