This is the base class for all interceptors to extend, and implements the {@link Visitor} interface allowing it tointercept invocations on {@link VisitableCommand}s.
Commands are either created by the {@link CacheImpl} (for invocations on the {@link Cache} public interface), orby the {@link InboundInvocationHandler} for remotely originating invocations, and are passed up the interceptor chainby using the {@link InterceptorChain} helper class.
When writing interceptors, authors can either override a specific visitXXX() method (such as {@link #visitGetKeyValueCommand(InvocationContext,GetKeyValueCommand)}) or the more generic {@link #handleDefault(InvocationContext,VisitableCommand)} which is the default behaviour of any visit method, as definedin {@link AbstractVisitor#handleDefault(InvocationContext,VisitableCommand)}.
The preferred approach is to override the specific visitXXX() methods that are of interest rather than to override {@link #handleDefault(InvocationContext,VisitableCommand)} and then write a series of if statements or a switchblock, if command-specific behaviour is needed.
@author Mircea.Markus@jboss.com
@see VisitableCommand
@see Visitor
@see InterceptorChain
@since 4.0