public class Mapper extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Mapper.SubMapper
Submapper class for the mapper object.
|
| Constructor and Description |
|---|
Mapper()
The constructor will be used only by the framework.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connect(String url,
String[] methods,
Object handler,
String action)
Connect a URL to the framework's url router.
|
void |
connect(String url,
String[] methods,
Object handler,
String action,
Permissions permissions)
Connect a URL to the framework's url router.
|
RouteMatch |
match(HttpRequest req)
This method is used by the framework.
|
Mapper.SubMapper |
subMapper(Object handler)
Returns a new sub mapper object.
|
public Mapper()
public Mapper.SubMapper subMapper(Object handler)
handler - Object of the handler class which has the action methodspublic void connect(String url, String[] methods, Object handler, String action) throws Exception
url - The url path.methods - Array of method names that apply on this urlhandler - Object of the handler class.action - The name of a public method defined in the handler
class that processes the functionality for this url.Exceptionpublic void connect(String url, String[] methods, Object handler, String action, Permissions permissions) throws Exception
url - The url path.methods - Array of method names that apply on this urlhandler - Object of the handler class.action - The name of a public method defined in the handler
class that processes the functionality for this url.permissions - Permissions object for this URLExceptionPermissionspublic RouteMatch match(HttpRequest req)
req - The http request objectCopyright © 2017. All rights reserved.