org.infinispan.interceptors
Class CallInterceptor

java.lang.Object
  extended by org.infinispan.commands.AbstractVisitor
      extended by org.infinispan.interceptors.base.CommandInterceptor
          extended by org.infinispan.interceptors.CallInterceptor
All Implemented Interfaces:
Visitor

public class CallInterceptor
extends CommandInterceptor

Always at the end of the chain, directly in front of the cache. Simply calls into the cache using reflection. If the call resulted in a modification, add the Modification to the end of the modification list keyed by the current transaction.

Since:
4.0
Author:
Bela Ban

Field Summary
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
CallInterceptor()
           
 
Method Summary
 Object handleDefault(InvocationContext ctx, VisitableCommand command)
          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 visitClearCommand(InvocationContext ctx, ClearCommand command)
           
 Object visitCommitCommand(InvocationContext ctx, CommitCommand command)
           
 Object visitPrepareCommand(InvocationContext ctx, PrepareCommand command)
           
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
           
 Object visitRollbackCommand(InvocationContext ctx, RollbackCommand command)
           
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitCollection, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitPutMapCommand, visitReplaceCommand, visitSizeCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallInterceptor

public CallInterceptor()
Method Detail

visitPrepareCommand

public Object visitPrepareCommand(InvocationContext ctx,
                                  PrepareCommand command)
                           throws Throwable
Specified by:
visitPrepareCommand in interface Visitor
Overrides:
visitPrepareCommand in class AbstractVisitor
Throws:
Throwable

visitCommitCommand

public Object visitCommitCommand(InvocationContext ctx,
                                 CommitCommand command)
                          throws Throwable
Specified by:
visitCommitCommand in interface Visitor
Overrides:
visitCommitCommand in class AbstractVisitor
Throws:
Throwable

visitRollbackCommand

public Object visitRollbackCommand(InvocationContext ctx,
                                   RollbackCommand command)
                            throws Throwable
Specified by:
visitRollbackCommand in interface Visitor
Overrides:
visitRollbackCommand in class AbstractVisitor
Throws:
Throwable

handleDefault

public Object handleDefault(InvocationContext ctx,
                            VisitableCommand command)
                     throws Throwable
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

visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitClearCommand

public Object visitClearCommand(InvocationContext ctx,
                                ClearCommand command)
                         throws Throwable
Specified by:
visitClearCommand in interface Visitor
Overrides:
visitClearCommand in class AbstractVisitor
Throws:
Throwable

visitRemoveCommand

public Object visitRemoveCommand(InvocationContext ctx,
                                 RemoveCommand command)
                          throws Throwable
Specified by:
visitRemoveCommand in interface Visitor
Overrides:
visitRemoveCommand in class AbstractVisitor
Throws:
Throwable


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