javax.interceptor
Annotation Type InterceptorBinding


@Target(value=ANNOTATION_TYPE)
@Retention(value=RUNTIME)
@Documented
public @interface InterceptorBinding

Specifies that an annotation type is an interceptor binding type.

 @Inherited 
 @InterceptorBinding 
 @Target({TYPE, METHOD}) 
 @Retention(RUNTIME) 
 public @interface Valid {}
 

Interceptor bindings are intermediate annotations that may be used to associate interceptors with target beans.

The interceptor bindings of an interceptor are specified by annotating the interceptor class with the binding types and the Interceptor annotation.

 @Valid @Interceptor
 public class ValidationInterceptor { ... }
 

An interceptor may specify multiple interceptor bindings.

An interceptor binding of a bean may be declared by annotating the bean class, or a method of the bean class, with the interceptor binding type.

 @Valid
 public class Order { ... }
 
 @Valid @Secure
 public void updateOrder(Order order) { ... }
 

A bean class or method of a bean class may declare multiple interceptor bindings.

An interceptor binding type may declare other interceptor bindings.

 @Inherited 
 @InterceptorBinding 
 @Target({TYPE, METHOD}) 
 @Retention(RUNTIME) 
 @Valid
 public @interface Secure {}
 

Interceptor bindings are transitive—an interceptor binding declared by an interceptor binding type is inherited by all beans and other interceptor binding types that declare that interceptor binding type.

Since:
Interceptors 1.1
See Also:
Interceptor



Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41