Interface LocaleResolverContext


  • public interface LocaleResolverContext

    Contextual data used by a LocaleResolver to resolve the request locale.

    Since:
    1.0
    Author:
    Christian Kaltepoth, Ivar Grimstad
    See Also:
    LocaleResolver
    • Method Detail

      • getConfiguration

        jakarta.ws.rs.core.Configuration getConfiguration()
        Returns the application's configuration.
        Returns:
        application's configuration.
        See Also:
        Configuration
      • getAcceptableLanguages

        List<Locale> getAcceptableLanguages()
        Get a list of languages that are acceptable for the response according to the Accept-Language HTTP header sent by the client.
        Returns:
        a read-only list of languages ordered by their q-value.
        See Also:
        Locale
      • getRequest

        jakarta.ws.rs.core.Request getRequest()
        Get the Jakarta RESTful Web Services Request instance.
        Returns:
        the Jakarta RESTful Web Services Request instance.
        See Also:
        Request
      • getUriInfo

        jakarta.ws.rs.core.UriInfo getUriInfo()
        Get request URI information.
        Returns:
        request URI information
        See Also:
        UriInfo
      • getCookie

        jakarta.ws.rs.core.Cookie getCookie​(String name)
        Returns the cookie with the given name.
        Parameters:
        name - the name of the cookie
        Returns:
        the cookie or null if no cookie with this name exists
        See Also:
        Cookie
      • getHeaderString

        String getHeaderString​(String name)
        Get the request header as a single string value.
        Parameters:
        name - the name of the request header
        Returns:
        the request header value. If the request header is not present then null is returned. If the request header is present more than once then the values of joined together and separated by a ',' character.