org.jboss.cache.interceptors
Class Interceptor

java.lang.Object
  extended by org.jboss.cache.commands.AbstractVisitor
      extended by org.jboss.cache.interceptors.base.CommandInterceptor
          extended by org.jboss.cache.interceptors.Interceptor
All Implemented Interfaces:
Visitor

Deprecated. this will be removed in a 3.x release. Please use CommandInterceptor instead, since it provides strongly typed callbacks which are more efficient.

@Deprecated
public abstract class Interceptor
extends CommandInterceptor

Class representing an interceptor.

Version:
$Id: Interceptor.java 7168 2008-11-19 17:37:20Z jason.greene@jboss.com $
Author:
Bela Ban

Field Summary
protected  CacheSPI<?,?> cache
          Deprecated.  
protected  boolean trace
          Deprecated.  
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log
 
Constructor Summary
Interceptor()
          Deprecated.  
 
Method Summary
 Object handleDefault(InvocationContext ctx, VisitableCommand command)
          Deprecated. The default behaviour of the visitXXX methods, which is to ignore the call and pass the call up to the next interceptor in the chain.
 Object invoke(InvocationContext ctx)
          Deprecated. Using this method call for forwarding a call in the chain is not redable and error prone in the case of interceptors extending other interceptors.
 Object nextInterceptor(InvocationContext ctx)
          Deprecated. Forwards the call to the nextInterceptor interceptor in the chain.
 void setCache(CacheSPI cache)
          Deprecated.  
 String toString()
          Deprecated.  
 
Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
getNext, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.jboss.cache.commands.AbstractVisitor
visitClearDataCommand, visitCollection, visitCommitCommand, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetDataMapCommand, visitGetChildrenNamesCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitOptimisticPrepareCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand, visitRollbackCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cache

protected CacheSPI<?,?> cache
Deprecated. 

trace

protected boolean trace
Deprecated. 
Constructor Detail

Interceptor

public Interceptor()
Deprecated. 
Method Detail

setCache

public void setCache(CacheSPI cache)
Deprecated. 

invoke

public Object invoke(InvocationContext ctx)
              throws Throwable
Deprecated. 
Using this method call for forwarding a call in the chain is not redable and error prone in the case of interceptors extending other interceptors. This metod rather refers to interceptor doing its business operations rather than delegating to the nextInterceptor interceptor in chain. For delegation please use nextInterceptor(org.jboss.cache.InvocationContext)

Throws:
Throwable

nextInterceptor

public Object nextInterceptor(InvocationContext ctx)
                       throws Throwable
Deprecated. 
Forwards the call to the nextInterceptor interceptor in the chain. This is here for backward compatibility.

Throws:
Throwable

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

handleDefault

public Object handleDefault(InvocationContext ctx,
                            VisitableCommand command)
                     throws Throwable
Deprecated. 
Description copied from class: CommandInterceptor
The default behaviour of the visitXXX methods, which is to ignore the call and pass the call up to the next interceptor in the chain.

Overrides:
handleDefault in class CommandInterceptor
Parameters:
ctx - invocation context
command - command to invoke
Returns:
return value
Throws:
Throwable - in the event of problems


Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.