public abstract class Resolver<T>
extends java.lang.Object
createResolver(Map)
static method can adapt a Java map into a resolver. Another useful method is
createResolver(Request, Response)
, which can expose a Restlet call
into a compact data model, with the following variables:
Model property | Variable name | Content type |
---|---|---|
request.confidential | c | boolean (true|false) |
request.clientInfo.address | cia | String |
request.clientInfo.upstreamAddress | ciua | String |
request.clientInfo.agent | cig | String |
request.challengeResponse.identifier | cri | String |
request.challengeResponse.scheme | crs | String |
request.date | d | Date (HTTP format) |
request.entity.characterSet | ecs | String |
response.entity.characterSet | ECS | String |
request.entity.encoding | ee | String |
response.entity.encoding | EE | String |
request.entity.expirationDate | eed | Date (HTTP format) |
response.entity.expirationDate | EED | Date (HTTP format) |
request.entity.language | el | String |
response.entity.language | EL | String |
request.entity.modificationDate | emd | Date (HTTP format) |
response.entity.modificationDate | EMD | Date (HTTP format) |
request.entity.mediaType | emt | String |
response.entity.mediaType | EMT | String |
request.entity.size | es | Integer |
response.entity.size | ES | Integer |
request.entity.tag | et | String |
response.entity.tag | ET | String |
request.referrerRef | f* | Reference (see table below variable name sub-parts) |
request.hostRef | h* | Reference (see table below variable name sub-parts) |
request.method | m | String |
request.rootRef | o* | Reference (see table below variable name sub-parts) |
request.protocol | p | String |
request.resourceRef | r* | Reference (see table below variable name sub-parts) |
response.redirectRef | R* | Reference (see table below variable name sub-parts) |
response.status | S | Integer |
response.serverInfo.address | SIA | String |
response.serverInfo.agent | SIG | String |
response.serverInfo.port | SIP | Integer |
Reference property | Sub-part name | Content type |
---|---|---|
authority | a | String |
baseRef | b* | Reference |
targetRef | t* | Reference |
relativePart | e | String |
fragment | f | String |
hostIdentifier | h | String |
identifier | i | String |
path | p | String |
query | q | String |
remainingPart | r | String |
Constructor and Description |
---|
Resolver() |
Modifier and Type | Method and Description |
---|---|
static Resolver<?> |
createResolver(java.util.Map<java.lang.String,?> map)
Creates a resolver that is based on a given map.
|
static Resolver<?> |
createResolver(Request request,
Response response)
Creates a resolver that is based on a call (request, response couple).
|
abstract T |
resolve(java.lang.String name)
Resolves a name into a value.
|
public static Resolver<?> createResolver(java.util.Map<java.lang.String,?> map)
map
- Map between names and values.public static Resolver<?> createResolver(Request request, Response response)
request
- The request.response
- The response.public abstract T resolve(java.lang.String name)
name
- The name to resolve.Copyright © 2005-2024 Restlet.