javax.ws.rs

Class Priorities


  • public final class Priorities
    extends Object
    A collection of built-in priority constants for the JAX-RS components that are supposed to be ordered based on their javax.annotation.Priority class-level annotation value when used or applied by JAX-RS runtime.

    For example, JAX-RS filters and interceptors are grouped in chains for each of the message processing extension points: Pre, PreMatch, Post as well as ReadFrom and WriteTo. Each of these chains is sorted based on priorities which are represented as integer numbers. All chains, except Post, are sorted in ascending order; the lower the number the higher the priority. The Post filter chain is sorted in descending order to ensure that response filters are executed in reverse order.

    JAX-RS components that belong to the same priority class (same integer value) are executed in an implementation-defined manner. By default, when the @Priority annotation is absent on a component, for which a priority should be applied, the USER priority value is used.

    Since:
    2.0
    Author:
    Marek Potociar (marek.potociar at oracle.com)
    • Field Detail

      • AUTHENTICATION

        public static final int AUTHENTICATION
        Security authentication filter/interceptor priority.
        See Also:
        Constant Field Values
      • AUTHORIZATION

        public static final int AUTHORIZATION
        Security authorization filter/interceptor priority.
        See Also:
        Constant Field Values
      • HEADER_DECORATOR

        public static final int HEADER_DECORATOR
        Header decorator filter/interceptor priority.
        See Also:
        Constant Field Values
      • ENTITY_CODER

        public static final int ENTITY_CODER
        Message encoder or decoder filter/interceptor priority.
        See Also:
        Constant Field Values
      • USER

        public static final int USER
        User-level filter/interceptor priority.
        See Also:
        Constant Field Values

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/ws/rs/priorities.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.