Enum Class RequestEvent.Type
- All Implemented Interfaces:
Serializable
,Comparable<RequestEvent.Type>
,java.lang.constant.Constable
- Enclosing interface:
- RequestEvent
The type of the event which describes in which request processing phase the event
is triggered.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAnExceptionMapper
is successfully found and it is going to be executed.Exception mapping is finished.The request and response processing has finished.The sub resource locator method is found and it will be called.The matching of the resource and resource method has started.Exception has been thrown during the request/response processing.Execution ofcontainer request filters
has been finished.The matching has been finished andcontainer request filters
are going to be executed.Resource method execution has finished.Resource method is going to be executed.Execution ofContainer response filters
has finished.Container response filters
are going to be executed.The request processing has started.The sub resource has been returned from sub resource locator, model was constructed, enhanced bymodel processor
, validated and the matching is going to be performed on the subresource
. -
Method Summary
Modifier and TypeMethodDescriptionstatic RequestEvent.Type
Returns the enum constant of this class with the specified name.static RequestEvent.Type[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
START
The request processing has started. This event type is handled only byApplicationEventListener.onRequest(RequestEvent)
and will never be called forRequestEventListener.onEvent(RequestEvent)
. -
MATCHING_START
The matching of the resource and resource method has started. -
LOCATOR_MATCHED
The sub resource locator method is found and it will be called. The locator method can be retrieved fromRequestEvent.getUriInfo()
by methodExtendedUriInfo.getMatchedResourceLocators()
. -
SUBRESOURCE_LOCATED
The sub resource has been returned from sub resource locator, model was constructed, enhanced bymodel processor
, validated and the matching is going to be performed on the subresource
. The sub resource can be retrieved fromRequestEvent.getUriInfo()
by methodExtendedUriInfo.getLocatorSubResources()
. -
REQUEST_MATCHED
The matching has been finished andcontainer request filters
are going to be executed. The request filters can be retrieved from event byRequestEvent.getContainerRequestFilters()
method. This method also determines end of the matching process and therefore the matching results can be retrieved usingRequestEvent.getUriInfo()
. -
REQUEST_FILTERED
Execution ofcontainer request filters
has been finished. -
RESOURCE_METHOD_START
Resource method is going to be executed. The resource method can be extracted fromExtendedUriInfo
returned byRequestEvent.getUriInfo()
. -
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
Container response filters
are going to be executed. In this point the response is already available and can be retrieved byRequestEvent.getContainerResponse()
. The response filters can be retrieved byRequestEvent.getContainerResponseFilters()
. This phase is executed in the regular response processing but might also been executed for processing on response mapped from exceptions byexception mappers
. In this case theON_EXCEPTION
event type precedes this event. -
RESP_FILTERS_FINISHED
Execution ofContainer 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 byexception mappers
. In this case theON_EXCEPTION
event type precedes this event. -
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 byRequestEvent.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 byRequestEvent.getException()
. -
EXCEPTION_MAPPER_FOUND
AnExceptionMapper
is successfully found and it is going to be executed. TheExceptionMapper
can be retrieved byRequestEvent.getExceptionMapper()
. -
EXCEPTION_MAPPING_FINISHED
Exception mapping is finished. The result of exception mapping can be checked byRequestEvent.isResponseSuccessfullyMapped()
which returns true when the exception mapping was successful. In this case the new response is available in theRequestEvent.getContainerResponse()
. -
FINISHED
The request and response processing has finished. The result of request processing can be checked byRequestEvent.isSuccess()
method. This method is called even when request processing fails and ends up with not handled exceptions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-