|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.service.Service
org.restlet.service.ConnegService
public class ConnegService
Application service negotiating the preferred resource variants. This service is leveraged by server-side and client-side content negotiation, annotated method dispatching, and so on.
Constructor Summary | |
---|---|
ConnegService()
Constructor. |
|
ConnegService(boolean enabled)
Constructor. |
Method Summary | |
---|---|
Variant |
getPreferredVariant(List<? extends Variant> variants,
Request request,
MetadataService metadataService)
Returns the best variant representation for a given resource according the the client preferences. A default language is provided in case the variants don't match the client preferences. |
boolean |
isStrict()
Indicates if the conneg algorithm should strictly respect client preferences or be more flexible. |
void |
setStrict(boolean strict)
Indicates if the conneg algorithm should strictly respect client preferences or be more flexible. |
Methods inherited from class org.restlet.service.Service |
---|
createInboundFilter, createOutboundFilter, getContext, isEnabled, isStarted, isStopped, setContext, setEnabled, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnegService()
public ConnegService(boolean enabled)
enabled
- True if the service has been enabled.Method Detail |
---|
public Variant getPreferredVariant(List<? extends Variant> variants, Request request, MetadataService metadataService)
variants
- The list of variants to compare.request
- The request including client preferences.metadataService
- The metadata service used to get default metadata values.
public boolean isStrict()
public void setStrict(boolean strict)
strict
- True if the conneg algorithm should strictly respect client
preferences.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |