org.jaffa.persistence.engines.jdbcengine.interceptor
Class AbstractInterceptor

java.lang.Object
  extended byorg.jaffa.persistence.engines.jdbcengine.interceptor.AbstractInterceptor
Direct Known Subclasses:
AddInterceptor, DeleteInterceptor, LockInterceptor, QueryInterceptor, UpdateInterceptor

public abstract class AbstractInterceptor
extends Object

This is the abstract class for an Interceptor. All new interceptors must inherit from this base class. A set of interceptors exists the Engine.


Constructor Summary
AbstractInterceptor()
           
 
Method Summary
 AbstractInterceptor getNextInterceptor()
          Returns the next Interceptor in the chain.
abstract  Object invoke(PersistentTransaction pt)
          Performs the actual logic associated with the interceptor.
 void setNextInterceptor(AbstractInterceptor next)
          Sets the next Interceptor in the chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInterceptor

public AbstractInterceptor()
Method Detail

setNextInterceptor

public void setNextInterceptor(AbstractInterceptor next)
Sets the next Interceptor in the chain.

Parameters:
next - the next Interceptor in the chain.

getNextInterceptor

public AbstractInterceptor getNextInterceptor()
Returns the next Interceptor in the chain. A null will be returned in case this is the end of the chain.

Returns:
the next Interceptor in the chain.

invoke

public abstract Object invoke(PersistentTransaction pt)
                       throws UOWException
Performs the actual logic associated with the interceptor. Should contain atomic logic, i.e., does not assumes input or output of other interceptors in the chain.

Parameters:
pt - The PersistentTransaction object, on which the Interceptor is to be executed.
Returns:
the output from the next Interceptor in the chain.
Throws:
UOWException - if any error occurs.


Copyright © 2002-2004 JAFFA Project.