org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle.bean
Class StatefulBean

java.lang.Object
  extended by org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle.bean.AbsSessionBean
      extended by org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle.bean.StatefulBean
All Implemented Interfaces:
SessionBeanItf

public class StatefulBean
extends AbsSessionBean
implements SessionBeanItf

Simple class for testing callbacks.

Author:
Florent Benoit

Field Summary
private  int counter
          Counter used for all callbacks.
private  boolean postActivateCalled
          PostActivate method has been called ?
private  boolean prePassivateCalled
          PrePassivate method has been called ?
 
Constructor Summary
StatefulBean()
           
 
Method Summary
 void calledPostActivate()
          Sets that method marked by @PostActivate has been called.
 void calledPrePassivate()
          Sets that method marked by @PrePassivate has been called.
 int getCounter()
           
 void increment()
          Increment the counter.
 boolean isPostActivateCalled()
           
 boolean isprePassivateCalled()
           
 
Methods inherited from class org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle.bean.AbsSessionBean
calledPostConstruct, calledPreDestroy, isPostConstructCalled, isPreDestroyCalled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prePassivateCalled

private boolean prePassivateCalled
PrePassivate method has been called ?


postActivateCalled

private boolean postActivateCalled
PostActivate method has been called ?


counter

private int counter
Counter used for all callbacks.

Constructor Detail

StatefulBean

public StatefulBean()
Method Detail

calledPrePassivate

public void calledPrePassivate()
Sets that method marked by @PrePassivate has been called.


isprePassivateCalled

public boolean isprePassivateCalled()
Returns:
true if method marked by @PrePassivate has been called.

calledPostActivate

public void calledPostActivate()
Sets that method marked by @PostActivate has been called.


isPostActivateCalled

public boolean isPostActivateCalled()
Returns:
true if method marked by @PostActivate has been called.

increment

public void increment()
Increment the counter.


getCounter

public int getCounter()
Returns:
the value of the internal counter.