org.objectweb.easybeans.tests.common.ejbs.stateless
Class SLSBSimpleInterceptorTest02

java.lang.Object
  extended by org.objectweb.easybeans.tests.common.ejbs.stateless.SLSBSimpleInterceptorTest02
All Implemented Interfaces:
ItfSimpleBeanRemote<java.lang.Integer>

public class SLSBSimpleInterceptorTest02
extends java.lang.Object
implements ItfSimpleBeanRemote<java.lang.Integer>

This bean is used to test embedded interceptors.

Author:
Eduardo Studzinski Estima de Castro, Gisele Pinheiro Souza

Field Summary
 
Fields inherited from interface org.objectweb.easybeans.tests.common.ejbs.stateless.ItfSimpleBeanRemote
EMBEDDED_INTERCEPTOR, ORDER
 
Constructor Summary
SLSBSimpleInterceptorTest02()
           
 
Method Summary
private  java.lang.Object addOrder(javax.ejb.InvocationContext invocationContext)
          Intercepts the method and add the ORDER value in the list that was get from InvocationContext.
 java.util.List<java.lang.Integer> withInterceptors(java.util.List<java.lang.Integer> par)
          Appends an Integer with the value 0 in the par.
 java.util.List<java.lang.Integer> withInterceptorsInheritance(java.util.List<java.lang.Integer> par)
          Appends an Integer with the value 0 in the par.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLSBSimpleInterceptorTest02

public SLSBSimpleInterceptorTest02()
Method Detail

withInterceptors

public java.util.List<java.lang.Integer> withInterceptors(java.util.List<java.lang.Integer> par)
Appends an Integer with the value 0 in the par. This method has interceptors that must be call in order.

Specified by:
withInterceptors in interface ItfSimpleBeanRemote<java.lang.Integer>
Parameters:
par - list used to append the value
Returns:
the list with modified

addOrder

private java.lang.Object addOrder(javax.ejb.InvocationContext invocationContext)
                           throws java.lang.Exception
Intercepts the method and add the ORDER value in the list that was get from InvocationContext.

Parameters:
invocationContext - contains attributes of invocation, the first parameter of the intercepted method must be a list.
Returns:
method's invocation result
Throws:
java.lang.Exception - if invocation fails

withInterceptorsInheritance

public java.util.List<java.lang.Integer> withInterceptorsInheritance(java.util.List<java.lang.Integer> par)
Appends an Integer with the value 0 in the par. This method has interceptors that must be call in order. There are interceptors that use inheritance.

Specified by:
withInterceptorsInheritance in interface ItfSimpleBeanRemote<java.lang.Integer>
Parameters:
par - list used to append the value
Returns:
the list with modified