public abstract class RouteImpl extends Object implements Route, Wrapper
Modifier | Constructor and Description |
---|---|
protected |
RouteImpl(String path)
Constructor
|
protected |
RouteImpl(String path,
String acceptType)
Constructor
|
protected |
RouteImpl(String path,
String acceptType,
Route route)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Object |
delegate() |
String |
getAcceptType() |
abstract Object |
handle(Request request,
Response response)
Invoked when a request is made on this route's corresponding path e.g.
|
Object |
render(Object element)
This method should render the given element into something that can be send through Response element.
|
protected RouteImpl(String path)
path
- The route path which is used for matching. (e.g. /hello, users/:name)protected RouteImpl(String path, String acceptType)
path
- The route path which is used for matching. (e.g. /hello, users/:name)acceptType
- The accept type which is used for matching.public abstract Object handle(Request request, Response response) throws Exception
public Object render(Object element) throws Exception
element
- to be rendered.Exception
- when render failspublic String getAcceptType()
Copyright © 2016. All rights reserved.