public class ConnegService extends Service
Constructor and Description |
---|
ConnegService()
Constructor.
|
ConnegService(boolean enabled)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Variant |
getPreferredVariant(java.util.List<? extends Variant> variants,
Request request,
MetadataService metadataService)
Returns the best variant representation for a given resource according
the 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.
|
createInboundFilter, createOutboundFilter, getContext, isEnabled, isStarted, isStopped, setContext, setEnabled, start, stop
public ConnegService()
public ConnegService(boolean enabled)
enabled
- True if the service has been enabled.public Variant getPreferredVariant(java.util.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.Copyright © 2005-2024 Restlet.