net.sourceforge.ccxjc.it.model.pkg.indexed.novalueclass.javaee
Interface InterceptorBindingType

All Known Implementing Classes:
InterceptorBindingTypeImpl

public interface InterceptorBindingType

The interceptor-bindingType element describes the binding of interceptor classes to beans within the ejb-jar. It consists of : - An optional description. - The name of an ejb within the ejb-jar or the wildcard value "*", which is used to define interceptors that are bound to all beans in the ejb-jar. - A list of interceptor classes that are bound to the contents of the ejb-name element or a specification of the total ordering over the interceptors defined for the given level and above. - An optional exclude-default-interceptors element. If set to true, specifies that default interceptors are not to be applied to a bean-class and/or business method. - An optional exclude-class-interceptors element. If set to true, specifies that class interceptors are not to be applied to a business method. - An optional set of method elements for describing the name/params of a method-level interceptor. Interceptors bound to all classes using the wildcard syntax "*" are default interceptors for the components in the ejb-jar. In addition, interceptors may be bound at the level of the bean class (class-level interceptors) or business methods (method-level interceptors ). The binding of interceptors to classes is additive. If interceptors are bound at the class-level and/or default-level as well as the method-level, both class-level and/or default-level as well as method-level will apply. There are four possible styles of the interceptor element syntax : 1.

 <?xml version="1.0" encoding="UTF-8"?><interceptor-binding xmlns="http://www.w3.org/2001/XMLSchema" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ejb-name>*</ejb-name><interceptor-class>INTERCEPTOR</interceptor-class></interceptor-binding>
 
Specifying the ejb-name as the wildcard value "*" designates default interceptors (interceptors that apply to all session and message-driven beans contained in the ejb-jar). 2.
 <?xml version="1.0" encoding="UTF-8"?><interceptor-binding xmlns="http://www.w3.org/2001/XMLSchema" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ejb-name>EJBNAME</ejb-name><interceptor-class>INTERCEPTOR</interceptor-class></interceptor-binding>
 
This style is used to refer to interceptors associated with the specified enterprise bean(class-level interceptors). 3.
 <?xml version="1.0" encoding="UTF-8"?><interceptor-binding xmlns="http://www.w3.org/2001/XMLSchema" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ejb-name>EJBNAME</ejb-name><interceptor-class>INTERCEPTOR</interceptor-class><method><method-name>METHOD</method-name></method></interceptor-binding>
 
This style is used to associate a method-level interceptor with the specified enterprise bean. If there are multiple methods with the same overloaded name, the element of this style refers to all the methods with the overloaded name. Method-level interceptors can only be associated with business methods of the bean class. Note that the wildcard value "*" cannot be used to specify method-level interceptors. 4.
 <?xml version="1.0" encoding="UTF-8"?><interceptor-binding xmlns="http://www.w3.org/2001/XMLSchema" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ejb-name>EJBNAME</ejb-name><interceptor-class>INTERCEPTOR</interceptor-class><method><method-name>METHOD</method-name><method-params><method-param>PARAM-1</method-param><method-param>PARAM-2</method-param>
                ...<method-param>PARAM-N</method-param></method-params></method></interceptor-binding>
 
This style is used to associate a method-level interceptor with the specified method of the specified enterprise bean. This style is used to refer to a single method within a set of methods with an overloaded name. The values PARAM-1 through PARAM-N are the fully-qualified Java types of the method's input parameters (if the method has no input arguments, the method-params element contains no method-param elements). Arrays are specified by the array element's type, followed by one or more pair of square brackets (e.g. int[][]).

Java class for interceptor-bindingType complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="interceptor-bindingType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element name="description" type="{http://java.sun.com/xml/ns/javaee}descriptionType" maxOccurs="unbounded" minOccurs="0"/>
         <element name="ejb-name" type="{http://java.sun.com/xml/ns/javaee}string"/>
         <choice>
           <element name="interceptor-class" type="{http://java.sun.com/xml/ns/javaee}fully-qualified-classType" maxOccurs="unbounded" minOccurs="0"/>
           <element name="interceptor-order" type="{http://java.sun.com/xml/ns/javaee}interceptor-orderType"/>
         </choice>
         <element name="exclude-default-interceptors" type="{http://java.sun.com/xml/ns/javaee}true-falseType" minOccurs="0"/>
         <element name="exclude-class-interceptors" type="{http://java.sun.com/xml/ns/javaee}true-falseType" minOccurs="0"/>
         <element name="method" type="{http://java.sun.com/xml/ns/javaee}named-methodType" minOccurs="0"/>
       </sequence>
       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
     </restriction>
   </complexContent>
 </complexType>
 


Method Summary
 DescriptionType[] getDescription()
           
 DescriptionType getDescription(int idx)
           
 int getDescriptionLength()
           
 String getEjbName()
          Gets the value of the ejbName property.
 TrueFalseType getExcludeClassInterceptors()
          Gets the value of the excludeClassInterceptors property.
 TrueFalseType getExcludeDefaultInterceptors()
          Gets the value of the excludeDefaultInterceptors property.
 String getId()
          Gets the value of the id property.
 FullyQualifiedClassType[] getInterceptorClass()
           
 FullyQualifiedClassType getInterceptorClass(int idx)
           
 int getInterceptorClassLength()
           
 InterceptorOrderType getInterceptorOrder()
          Gets the value of the interceptorOrder property.
 NamedMethodType getMethod()
          Gets the value of the method property.
 void setDescription(DescriptionType[] values)
           
 DescriptionType setDescription(int idx, DescriptionType value)
           
 void setEjbName(String value)
          Sets the value of the ejbName property.
 void setExcludeClassInterceptors(TrueFalseType value)
          Sets the value of the excludeClassInterceptors property.
 void setExcludeDefaultInterceptors(TrueFalseType value)
          Sets the value of the excludeDefaultInterceptors property.
 void setId(String value)
          Sets the value of the id property.
 void setInterceptorClass(FullyQualifiedClassType[] values)
           
 FullyQualifiedClassType setInterceptorClass(int idx, FullyQualifiedClassType value)
           
 void setInterceptorOrder(InterceptorOrderType value)
          Sets the value of the interceptorOrder property.
 void setMethod(NamedMethodType value)
          Sets the value of the method property.
 

Method Detail

getDescription

DescriptionType[] getDescription()
Returns:
array of DescriptionType

getDescription

DescriptionType getDescription(int idx)
Returns:
one of DescriptionType

getDescriptionLength

int getDescriptionLength()

setDescription

void setDescription(DescriptionType[] values)
Parameters:
values - allowed objects are DescriptionType

setDescription

DescriptionType setDescription(int idx,
                               DescriptionType value)
Parameters:
value - allowed object is DescriptionType

getEjbName

String getEjbName()
Gets the value of the ejbName property.

Returns:
possible object is String

setEjbName

void setEjbName(String value)
Sets the value of the ejbName property.

Parameters:
value - allowed object is String

getInterceptorClass

FullyQualifiedClassType[] getInterceptorClass()
Returns:
array of FullyQualifiedClassType

getInterceptorClass

FullyQualifiedClassType getInterceptorClass(int idx)
Returns:
one of FullyQualifiedClassType

getInterceptorClassLength

int getInterceptorClassLength()

setInterceptorClass

void setInterceptorClass(FullyQualifiedClassType[] values)
Parameters:
values - allowed objects are FullyQualifiedClassType

setInterceptorClass

FullyQualifiedClassType setInterceptorClass(int idx,
                                            FullyQualifiedClassType value)
Parameters:
value - allowed object is FullyQualifiedClassType

getInterceptorOrder

InterceptorOrderType getInterceptorOrder()
Gets the value of the interceptorOrder property.

Returns:
possible object is InterceptorOrderType

setInterceptorOrder

void setInterceptorOrder(InterceptorOrderType value)
Sets the value of the interceptorOrder property.

Parameters:
value - allowed object is InterceptorOrderType

getExcludeDefaultInterceptors

TrueFalseType getExcludeDefaultInterceptors()
Gets the value of the excludeDefaultInterceptors property.

Returns:
possible object is TrueFalseType

setExcludeDefaultInterceptors

void setExcludeDefaultInterceptors(TrueFalseType value)
Sets the value of the excludeDefaultInterceptors property.

Parameters:
value - allowed object is TrueFalseType

getExcludeClassInterceptors

TrueFalseType getExcludeClassInterceptors()
Gets the value of the excludeClassInterceptors property.

Returns:
possible object is TrueFalseType

setExcludeClassInterceptors

void setExcludeClassInterceptors(TrueFalseType value)
Sets the value of the excludeClassInterceptors property.

Parameters:
value - allowed object is TrueFalseType

getMethod

NamedMethodType getMethod()
Gets the value of the method property.

Returns:
possible object is NamedMethodType

setMethod

void setMethod(NamedMethodType value)
Sets the value of the method property.

Parameters:
value - allowed object is NamedMethodType

getId

String getId()
Gets the value of the id property.

Returns:
possible object is String

setId

void setId(String value)
Sets the value of the id property.

Parameters:
value - allowed object is String


Copyright © 2009 The CC-XJC Community. All Rights Reserved.