public class Extractor extends Filter
Constructor and Description |
---|
Extractor()
Constructor.
|
Extractor(Context context)
Constructor.
|
Extractor(Context context,
Restlet next)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet.
|
void |
extractFromCookie(java.lang.String attribute,
java.lang.String cookieName,
boolean first)
Extracts an attribute from the request cookies.
|
void |
extractFromEntity(java.lang.String attribute,
java.lang.String parameter,
boolean first)
Extracts an attribute from the request entity form.
|
void |
extractFromQuery(java.lang.String attribute,
java.lang.String parameter,
boolean first)
Extracts an attribute from the query string of the resource reference.
|
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
public Extractor()
public Extractor(Context context)
context
- The context.protected int beforeHandle(Request request, Response response)
Message.getAttributes()
).beforeHandle
in class Filter
request
- The request to filter.response
- The response to filter.public void extractFromCookie(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 void extractFromEntity(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 void extractFromQuery(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.Copyright © 2005-2024 Restlet.