public abstract class Route extends AbstractRoute
Modifier | Constructor and Description |
---|---|
protected |
Route(String path)
Constructor
|
protected |
Route(String path,
String acceptType)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getAcceptType() |
abstract Object |
handle(Request request,
Response response)
Invoked when a request is made on this route's corresponding path e.g.
|
String |
render(Object element)
This method should render the given element into something that can be send through Response element.
|
halt, halt, halt, halt
protected Route(String path)
path
- The route path which is used for matching. (e.g. /hello, users/:name)public abstract Object handle(Request request, Response response)
request
- The request object providing information about the HTTP requestresponse
- The response object providing functionality for modifying the responsepublic String render(Object element)
element
- to be rendered.public String getAcceptType()
Copyright © 2013. All Rights Reserved.