TemplateRoute
instead.@Deprecated public class Route extends TemplateRoute
Template
Constructor and Description |
---|
Route(Restlet next)
Deprecated.
Constructor behaving as a simple extractor filter.
|
Route(Router router,
java.lang.String uriTemplate,
Restlet next)
Deprecated.
Constructor.
|
Route(Router router,
Template template,
Restlet next)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
beforeHandle(Request request,
Response response)
Deprecated.
Allows filtering before its handling by the target Restlet.
|
Route |
extractCookie(java.lang.String attribute,
java.lang.String cookieName,
boolean first)
Deprecated.
Extracts an attribute from the request cookies.
|
Route |
extractEntity(java.lang.String attribute,
java.lang.String parameter,
boolean first)
Deprecated.
Extracts an attribute from the request entity form.
|
Route |
extractQuery(java.lang.String attribute,
java.lang.String parameter,
boolean first)
Deprecated.
Extracts an attribute from the query string of the resource reference.
|
void |
validate(java.lang.String attribute,
boolean required,
java.lang.String format)
Deprecated.
Checks the request attributes for presence, format, etc.
|
getMatchingMode, getMatchQuery, getRouter, getTemplate, isMatchingQuery, score, setMatchingMode, setMatchingQuery, setMatchQuery, setRouter, setTemplate, toString
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
finalize, getApplication, getAuthor, getContext, getDescription, getLogger, getName, getOwner, isStarted, isStopped, setAuthor, setContext, setDescription, setName, setOwner
public Route(Restlet next)
next
- The next Restlet.public Route(Router router, java.lang.String uriTemplate, Restlet next)
Template.MODE_STARTS_WITH
matching mode. This can be changed by
getting the template and calling Template.setMatchingMode(int)
with Template.MODE_EQUALS
for exact matching.router
- The parent router.uriTemplate
- The URI template.next
- The next Restlet.protected int beforeHandle(Request request, Response response)
validate(String, boolean, String)
method.beforeHandle
in class TemplateRoute
request
- The request to filter.response
- The response to filter.public Route extractCookie(java.lang.String attribute, java.lang.String cookieName, boolean first)
attribute
- The name of the request attribute to set.cookieName
- The name of the cookies to extract.first
- Indicates if only the first cookie should be set. Otherwise as
a List instance might be set in the attribute value.public Route extractEntity(java.lang.String attribute, java.lang.String parameter, boolean first)
attribute
- The name of the request attribute to set.parameter
- The name of the entity form parameter to extract.first
- Indicates if only the first cookie should be set. Otherwise as
a List instance might be set in the attribute value.public Route extractQuery(java.lang.String attribute, java.lang.String parameter, boolean first)
attribute
- The name of the request attribute to set.parameter
- The name of the query string parameter to extract.first
- Indicates if only the first cookie should be set. Otherwise as
a List instance might be set in the attribute value.public void validate(java.lang.String attribute, boolean required, java.lang.String format)
attribute
- Name of the attribute to look for.required
- Indicates if the attribute presence is required.format
- Format of the attribute value, using Regex pattern syntax.Copyright © 2005-2012. All Rights Reserved.