Method Summary |
|
public List<Preference<CharacterSet>> | getAcceptedCharacterSets() Returns the character set preferences. |
public List<Preference<Encoding>> | getAcceptedEncodings() Returns the encoding preferences. |
public List<Preference<Language>> | getAcceptedLanguages() Returns the language preferences. |
public List<Preference<MediaType>> | getAcceptedMediaTypes() Returns the media type preferences. |
public String | getAddress() Returns the client's IP address. |
public List<String> | getAddresses() Returns the list of client IP addresses. The first address is the
one of the immediate client component as returned by the
getClientAdress() method and the last address should correspond to the
origin client (frequently a user agent). |
public String | getAgent() Returns the agent name (ex: "Noelios Restlet Engine/1.0"). |
public int | getPort() Returns the port number which sent the call. |
public Variant | getPreferredVariant(List<Variant> variants, Language defaultLanguage) Returns the best variant for a given resource according the the client
preferences: accepted languages, accepted character sets, accepted media
types and accepted encodings. A default language is provided in case
the variants don't match the client preferences.
Parameters: variants - The list of variants to compare. Parameters: defaultLanguage - The default language. |
public Variant | getPreferredVariant(Resource resource, Language defaultLanguage) Returns the best variant for a given resource according the the client
preferences. A default language is provided in case the resource's
variants don't match the client preferences.
Parameters: resource - The resource for which the best representation needs to beset. Parameters: defaultLanguage - The default language. |
public void | setAddress(String address) Sets the client's IP address. |
public void | setAgent(String agent) Sets the agent name (ex: "Noelios Restlet Engine/1.0"). |
public void | setPort(int port) Sets the port number which sent the call. |