cuba
Class AbstractComponentAdapter

java.lang.Object
  extended by cuba.AbstractComponentAdapter
Direct Known Subclasses:
EJB2Adapter, EJB3Adapter, WiredAdapter

public abstract class AbstractComponentAdapter
extends java.lang.Object

Common base class for all kinds of adapters.


Field Summary
protected  java.lang.Object core
           
 
Constructor Summary
AbstractComponentAdapter()
           
 
Method Summary
protected abstract  java.lang.Object _getCore()
           
protected  void _initCore(ComponentContextI componentContext)
          Runs _injectDependencies(cuba.ComponentContextI) followed by _postConstruct() to initialize the component the EJB 3 way.
protected  void _injectDependencies(ComponentContextI context)
          This function is used in derived adapter classes to inject dependend objects (other components and resources) in EJB 3 style.
protected  void _postActivate()
          Derived types may override this method to invoke all methods with a @PostActivate annotation.
protected  void _postConstruct()
          Derived types may override this method to invoke all methods with a @PostConstruct annotation.
protected  void _preDestroy()
          Derived types may override this method to invoke all methods with a @PreDestroy annotation.
protected  void _prePassivate()
          Derived types may override this method to invoke all methods with a @PrePassivate annotation.
protected  java.lang.Boolean box(boolean b)
           
protected  java.lang.Byte box(byte b)
           
protected  java.lang.Character box(char c)
           
protected  java.lang.Double box(double d)
           
protected  java.lang.Float box(float f)
           
protected  java.lang.Integer box(int i)
           
protected  java.lang.Long box(long l)
           
protected  java.lang.Short box(short s)
           
protected  java.lang.Object invoke(java.lang.reflect.Method coreMethod, java.lang.Object[] params, AroundInvocation commonInterceptors)
           
protected  java.lang.Object invoke(java.lang.reflect.Method coreMethod, java.lang.Object[] params, AroundInvocation privateInterceptors, AroundInvocation commonInterceptors)
           
protected  void invokeLifecycle(java.lang.reflect.Method coreMethod, AroundInvocation commonInterceptors)
           
protected abstract  MethodInvocation invoker()
           
static java.lang.RuntimeException runtimeException(java.lang.Throwable t)
           
protected  boolean unbox_boolean(java.lang.Object source)
           
protected  byte unbox_byte(java.lang.Object source)
           
protected  char unbox_char(java.lang.Object source)
           
protected  double unbox_double(java.lang.Object source)
           
protected  float unbox_float(java.lang.Object source)
           
protected  short unbox_hort(java.lang.Object source)
           
protected  int unbox_int(java.lang.Object source)
           
protected  long unbox_long(java.lang.Object source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

core

protected java.lang.Object core
Constructor Detail

AbstractComponentAdapter

public AbstractComponentAdapter()
Method Detail

_getCore

protected abstract java.lang.Object _getCore()

_preDestroy

protected void _preDestroy()
Derived types may override this method to invoke all methods with a @PreDestroy annotation.


_injectDependencies

protected void _injectDependencies(ComponentContextI context)
                            throws ConstructionException,
                                   ReferenceException
This function is used in derived adapter classes to inject dependend objects (other components and resources) in EJB 3 style.

Throws:
ConstructionException
ReferenceException

_postConstruct

protected void _postConstruct()
Derived types may override this method to invoke all methods with a @PostConstruct annotation.


_prePassivate

protected void _prePassivate()
Derived types may override this method to invoke all methods with a @PrePassivate annotation.


_postActivate

protected void _postActivate()
Derived types may override this method to invoke all methods with a @PostActivate annotation.


_initCore

protected void _initCore(ComponentContextI componentContext)
Runs _injectDependencies(cuba.ComponentContextI) followed by _postConstruct() to initialize the component the EJB 3 way. If _postConstruct() throws an exception, the function determines if it is running in a TX context and rolls it back if existing, according to the EJB 3 specification.

Throws:
{@link - ComponentException} if anything happens :-)

runtimeException

public static java.lang.RuntimeException runtimeException(java.lang.Throwable t)

box

protected java.lang.Boolean box(boolean b)

box

protected java.lang.Byte box(byte b)

box

protected java.lang.Character box(char c)

box

protected java.lang.Short box(short s)

box

protected java.lang.Integer box(int i)

box

protected java.lang.Long box(long l)

box

protected java.lang.Float box(float f)

box

protected java.lang.Double box(double d)

unbox_boolean

protected boolean unbox_boolean(java.lang.Object source)

unbox_byte

protected byte unbox_byte(java.lang.Object source)

unbox_char

protected char unbox_char(java.lang.Object source)

unbox_hort

protected short unbox_hort(java.lang.Object source)

unbox_int

protected int unbox_int(java.lang.Object source)

unbox_long

protected long unbox_long(java.lang.Object source)

unbox_float

protected float unbox_float(java.lang.Object source)

unbox_double

protected double unbox_double(java.lang.Object source)

invoker

protected abstract MethodInvocation invoker()

invoke

protected java.lang.Object invoke(java.lang.reflect.Method coreMethod,
                                  java.lang.Object[] params,
                                  AroundInvocation commonInterceptors)
                           throws java.lang.Exception
Throws:
java.lang.Exception

invoke

protected java.lang.Object invoke(java.lang.reflect.Method coreMethod,
                                  java.lang.Object[] params,
                                  AroundInvocation privateInterceptors,
                                  AroundInvocation commonInterceptors)
                           throws java.lang.Exception
Throws:
java.lang.Exception

invokeLifecycle

protected void invokeLifecycle(java.lang.reflect.Method coreMethod,
                               AroundInvocation commonInterceptors)