Module jakarta.mvc

Interface LocaleResolverContext


  • public interface LocaleResolverContext

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

    Since:
    1.0
    See Also:
    LocaleResolver
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.util.Locale> getAcceptableLanguages()
      Get a list of languages that are acceptable for the response according to the Accept-Language HTTP header sent by the client.
      jakarta.ws.rs.core.Configuration getConfiguration()
      Returns the application's configuration.
      jakarta.ws.rs.core.Cookie getCookie​(java.lang.String name)
      Returns the cookie with the given name.
      java.lang.String getHeaderString​(java.lang.String name)
      Get the request header as a single string value.
      jakarta.ws.rs.core.Request getRequest()
      Get the Jakarta RESTful Web Services Request instance.
      jakarta.ws.rs.core.UriInfo getUriInfo()
      Get request URI information.
    • Method Detail

      • getConfiguration

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

        java.util.List<java.util.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​(java.lang.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

        java.lang.String getHeaderString​(java.lang.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.