org.jboss.ejb3.interceptors.direct
Class AbstractDirectContainer<T,C extends AbstractDirectContainer<T,C>>
java.lang.Object
org.jboss.ejb3.interceptors.annotation.AnnotationAdvisorSupport
org.jboss.ejb3.interceptors.container.AbstractContainer<T,C>
org.jboss.ejb3.interceptors.direct.AbstractDirectContainer<T,C>
- All Implemented Interfaces:
- AnnotationAdvisor
- Direct Known Subclasses:
- DirectContainer
public abstract class AbstractDirectContainer<T,C extends AbstractDirectContainer<T,C>>
- extends AbstractContainer<T,C>
The direct container invokes interceptors directly on an instance.
It's useful in an environment where we don't want to fiddle with the
classloader and still have control on how instances are called.
- Version:
- $Revision: 80194 $
- Author:
- Carlo de Wolf
Method Summary |
BeanContext<T> |
construct()
|
BeanContext<T> |
construct(Object[] initargs,
Class<?>[] parameterTypes)
|
void |
destroy(BeanContext<T> bean)
|
Class<? extends T> |
getBeanClass()
Do not call, for use in indirect container implementations. |
InterceptorRegistry |
getInterceptorRegistry()
|
Object |
invoke(BeanContext<T> target,
Method method,
Object[] arguments)
Call a method upon a target object with all interceptors in place. |
|
invoke(BeanContext<T> target,
String methodName,
Object... args)
A convenient, but unchecked and slow method to call a method upon a target. |
Object |
invokeIndirect(Object target,
Method method,
Object[] arguments)
Do not call, for use in indirect container implementations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDirectContainer
protected AbstractDirectContainer()
AbstractDirectContainer
protected AbstractDirectContainer(String name,
org.jboss.aop.Domain domain,
Class<? extends T> beanClass)
AbstractDirectContainer
protected AbstractDirectContainer(String name,
String domainName,
Class<? extends T> beanClass)
construct
public BeanContext<T> construct()
throws SecurityException,
NoSuchMethodException
- Throws:
SecurityException
NoSuchMethodException
construct
public BeanContext<T> construct(Object[] initargs,
Class<?>[] parameterTypes)
throws SecurityException,
NoSuchMethodException
- Throws:
SecurityException
NoSuchMethodException
destroy
public void destroy(BeanContext<T> bean)
- Overrides:
destroy
in class AbstractContainer<T,C extends AbstractDirectContainer<T,C>>
getBeanClass
public Class<? extends T> getBeanClass()
- Do not call, for use in indirect container implementations.
- Overrides:
getBeanClass
in class AbstractContainer<T,C extends AbstractDirectContainer<T,C>>
- Returns:
getInterceptorRegistry
public InterceptorRegistry getInterceptorRegistry()
- Overrides:
getInterceptorRegistry
in class AbstractContainer<T,C extends AbstractDirectContainer<T,C>>
invoke
public Object invoke(BeanContext<T> target,
Method method,
Object[] arguments)
throws Throwable
- Description copied from class:
AbstractContainer
- Call a method upon a target object with all interceptors in place.
- Overrides:
invoke
in class AbstractContainer<T,C extends AbstractDirectContainer<T,C>>
- Parameters:
target
- the target to invoke uponmethod
- the method to invokearguments
- arguments to the method
- Returns:
- return value of the method
- Throws:
Throwable
- if anything goes wrong
invoke
public <R> R invoke(BeanContext<T> target,
String methodName,
Object... args)
throws Throwable
- A convenient, but unchecked and slow method to call a method upon a target.
(Slow method)
- Overrides:
invoke
in class AbstractContainer<T,C extends AbstractDirectContainer<T,C>>
- Type Parameters:
R
- the return type- Parameters:
target
- the target to invoke uponmethodName
- the method name to invokeargs
- the arguments to the method
- Returns:
- the return value
- Throws:
Throwable
- if anything goes wrong
invokeIndirect
public Object invokeIndirect(Object target,
Method method,
Object[] arguments)
throws Throwable
- Do not call, for use in indirect container implementations.
- Throws:
Throwable
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.