Top Description Inners Methods
javax.interceptor

public @Interface Interceptor

extends Annotation
Annotations
@Retention:RUNTIME
@Target:TYPE
@Documented
Static Imports
java.lang.annotation.ElementType.TYPE, .RetentionPolicy.RUNTIME

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).

Since
Interceptors 1.1
See Also
javax.interceptor.Interceptors

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Interceptor.Priority

Priorities that define the order in which interceptors are invoked.

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
javax.interceptor back to summary

public Class Interceptor.Priority

extends Object
Class Inheritance

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.
Since
Interceptors 1.2
See Also
javax.annotation.Priority

Field Summary

Modifier and TypeField 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.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

APPLICATIONback to summary
public static final int APPLICATION

Start of range for interceptors defined by applications.

LIBRARY_AFTERback to summary
public static final int LIBRARY_AFTER

Start of range for late interceptors defined by extension libraries.

LIBRARY_BEFOREback to summary
public static final int LIBRARY_BEFORE

Start of range for early interceptors defined by extension libraries.

PLATFORM_AFTERback to summary
public static final int PLATFORM_AFTER

Start of range for late interceptors defined by platform specifications.

PLATFORM_BEFOREback to summary
public static final int PLATFORM_BEFORE

Start of range for early interceptors defined by platform specifications.

Constructor Detail

Priorityback to summary
private Priority()