Specifies that a class is an interceptor.
@Validated @Interceptor
public class ValidationInterceptor { ... }
Use of this annotation is required when declaring an interceptor
using interceptor binding annotations.
It is ignored during the processing of classes bound using the Interceptors annotation (or when
the EJB deployment descriptor is used to associate the interceptor
with the target class).
javax.interceptor.Interceptors
| Modifier and Type | Class and Description |
|---|---|
| public static class | Interceptor.Priority
Priorities that define the order in which interceptors are invoked. |
Priorities that define the order in which interceptors are
invoked. These values are intended to be used with the
Priority annotation for
interceptors that are defined by means of interceptor binding.
Interceptors with smaller priority values are called first. If more than one interceptor has the same priority, the relative order of those interceptors is undefined.
An interceptor that must be invoked before or after another defined interceptor can choose any appropriate value.
For example, an extension library might define an interceptor like this:
@Priority(Interceptor.Priority.LIBRARY_BEFORE+10)
@Validated @Interceptor
public class ValidationInterceptor { ... }
The Priority annotation is
ignored when computing the invocation order of interceptors
bound to a target using the Interceptors annotation.
javax.annotation.Priority
| Modifier and Type | Field and Description |
|---|---|
| public static final int | APPLICATION
Start of range for interceptors defined by applications. |
| public static final int | LIBRARY_AFTER
Start of range for late interceptors defined by extension libraries. |
| public static final int | LIBRARY_BEFORE
Start of range for early interceptors defined by extension libraries. |
| public static final int | PLATFORM_AFTER
Start of range for late interceptors defined by platform specifications. |
| public static final int | PLATFORM_BEFORE
Start of range for early interceptors defined by platform specifications. |
| Access | Constructor and Description |
|---|---|
| private |
| APPLICATION | back to summary |
|---|---|
| public static final int APPLICATION Start of range for interceptors defined by applications. | |
| LIBRARY_AFTER | back to summary |
|---|---|
| public static final int LIBRARY_AFTER Start of range for late interceptors defined by extension libraries. | |
| LIBRARY_BEFORE | back to summary |
|---|---|
| public static final int LIBRARY_BEFORE Start of range for early interceptors defined by extension libraries. | |
| PLATFORM_AFTER | back to summary |
|---|---|
| public static final int PLATFORM_AFTER Start of range for late interceptors defined by platform specifications. | |
| PLATFORM_BEFORE | back to summary |
|---|---|
| public static final int PLATFORM_BEFORE Start of range for early interceptors defined by platform specifications. | |
| Priority | back to summary |
|---|---|
| private Priority() | |