org.jboss.ejb.plugins
abstract public class: AbstractInterceptor [javadoc |
source]
java.lang.Object
org.jboss.ejb.plugins.AbstractInterceptor
All Implemented Interfaces:
Interceptor
Direct Known Subclasses:
SSLSessionInterceptor, JDBCRelationInterceptor, EntityReentranceInterceptor, TxStatisticsInterceptor, CleanShutdownInterceptor, EntityBeanCacheBatchInvalidatorInterceptor, TxInterceptorCMT, TxInterceptorBMT, AbstractTxInterceptor, CachedConnectionInterceptor, AbstractTxInterceptorBMT, RunAsSecurityInterceptor, EntityMultiInstanceSynchronizationInterceptor, MessageDrivenInstanceInterceptor, CounterInterceptor, EntityMultiInstanceInterceptor, EntitySynchronizationInterceptor, SecurityRolesInterceptor, StatefulSessionInstanceInterceptor, PreSecurityInterceptor, ExplicitFailoverServerInterceptor, EntityLockInterceptor, MetricsInterceptor, EntityCreationInterceptor, RelationInterceptor, ServerTCLInterceptor, StatefulHASessionSynchronisationInterceptor, ServiceEndpointInterceptor, EntityInstanceInterceptor, ServerEncryptionInterceptor, ProxyFactoryFinderInterceptor, StatelessSessionInstanceInterceptor, SecurityProxyInterceptor, MessageDrivenTxInterceptorBMT, CallValidationInterceptor, NoTxPropagationInterceptor, StatefulSessionSecurityInterceptor, LogInterceptor, SecurityInterceptor
An abstract base class for container interceptors.
- author:
< - a href="mailto:rickard.oberg@telkel.com">Rickard Oberg
- author:
< - a href="mailto:jason@planet57.com">Jason Dillon
- author:
Scott.Stark - @jboss.org
- version:
$ - Revision: 66439 $
| Field Summary |
|---|
| protected Interceptor | nextInterceptor | The next interceptor in the chain. |
| protected Logger | log | Logging instance |
| protected Container | container | The container the interceptor is associated with |
| Method from org.jboss.ejb.plugins.AbstractInterceptor Summary: |
|---|
|
create, destroy, getContainer, getNext, invoke, invokeHome, isAppException, setContainer, setNext, start, stop |
| Method from org.jboss.ejb.plugins.AbstractInterceptor Detail: |
public void create() throws Exception {
// empty
}
|
public void destroy() {
// empty
}
|
public Container getContainer() {
return container;
}
|
public Interceptor getNext() {
return nextInterceptor;
}
|
public Object invoke(Invocation mi) throws Exception {
// assert mi != null;
return getNext().invoke(mi);
}
|
public Object invokeHome(Invocation mi) throws Exception {
// assert mi != null;
return getNext().invokeHome(mi);
}
|
public boolean isAppException(Invocation invocation,
Throwable e) {
Method m = invocation.getMethod();
Class[] exceptions = m.getExceptionTypes();
boolean isAppException = false;
for(int n = 0; isAppException == false && n < exceptions.length; n ++)
{
Class exType = exceptions[n];
isAppException = exType.isInstance(e);
}
return isAppException;
}
See if the given exception e is compatible with an exception declared
as thrown by the invocation method. |
public void setContainer(Container container) {
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Interceptor implementation ------------------------------------
this.container = container;
}
|
public void setNext(Interceptor interceptor) {
// assert interceptor != null
nextInterceptor = interceptor;
}
|
public void start() throws Exception {
// empty
}
|
public void stop() {
// empty
}
|