Annotation Type InterceptorBinding

public @interface InterceptorBinding

Specifies that an annotation type is an interceptor binding type.

 @Target({TYPE, METHOD}) 
 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.

 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.

 @Target({TYPE, METHOD}) 
 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.

Interceptors 1.1
See Also:

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

Scripting on this page tracks web page traffic, but does not change the content in any way.