Enum RequestEvent.Type

    • Enum Constant Detail

      • MATCHING_START

        public static final RequestEvent.Type MATCHING_START
        The matching of the resource and resource method has started.
      • REQUEST_FILTERED

        public static final RequestEvent.Type REQUEST_FILTERED
        Execution of container request filters has been finished.
      • RESOURCE_METHOD_FINISHED

        public static final RequestEvent.Type RESOURCE_METHOD_FINISHED
        Resource method execution has finished. In the case of synchronous processing the response is not available yet. In the case of asynchronous processing the situation depends on the method design and it in some cases on race conditions. In asynchronous cases this event can be triggered even after the response is completely processed. Exactly defined, this event is triggered when the thread executing the resource method returns from the resource method.
      • RESP_FILTERS_START

        public static final RequestEvent.Type RESP_FILTERS_START
        Container response filters are going to be executed. In this point the response is already available and can be retrieved by RequestEvent.getContainerResponse(). The response filters can be retrieved by RequestEvent.getContainerResponseFilters().

        This phase is executed in the regular response processing but might also been executed for processing on response mapped from exceptions by exception mappers. In this case the ON_EXCEPTION event type precedes this event.

      • RESP_FILTERS_FINISHED

        public static final RequestEvent.Type RESP_FILTERS_FINISHED
        Execution of Container response filters has finished.

        This phase is executed in the regular response processing but might also been executed for processing on response mapped from exceptions by exception mappers. In this case the ON_EXCEPTION event type precedes this event.

      • ON_EXCEPTION

        public static final RequestEvent.Type ON_EXCEPTION
        Exception has been thrown during the request/response processing. This situation can occur in almost all phases of request processing and therefore there is no fixed order of events in which this event type can be triggered.

        The origin of exception can be retrieved by RequestEvent.getExceptionCause(). This event type can be received even two types in the case when first exception is thrown during the standard request processing and the second one is thrown during the processing of the response mapped from the exception.

        The exception thrown can be retrieved by RequestEvent.getException().

      • FINISHED

        public static final RequestEvent.Type FINISHED
        The request and response processing has finished. The result of request processing can be checked by RequestEvent.isSuccess() method. This method is called even when request processing fails and ends up with not handled exceptions.
    • Method Detail

      • values

        public static RequestEvent.Type[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RequestEvent.Type c : RequestEvent.Type.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RequestEvent.Type valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null