org.jboss.cache.interceptors
Class InvocationContextInterceptor
java.lang.Object
org.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
org.jboss.cache.interceptors.InvocationContextInterceptor
- All Implemented Interfaces:
- Visitor, InterceptorMBean, InvocationContextInterceptorMBean
public class InvocationContextInterceptor
- extends BaseTransactionalContextInterceptor
- implements InvocationContextInterceptorMBean
Always place this interceptor at the start of the interceptor chain to ensure invocation contexts and set up and cleaned up correctly.
- Author:
- Manik Surtani (manik@jboss.org)
Method Summary |
Object |
handleAll(InvocationContext ctx,
VisitableCommand command,
GlobalTransaction gtx)
|
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. |
void |
setDependencies(RPCManager rpcManager)
|
Object |
visitCommitCommand(InvocationContext ctx,
CommitCommand command)
Visits a CommitCommand. |
Object |
visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
Visits a OptimisticPrepareCommand. |
Object |
visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
Visits a PrepareCommand. |
Object |
visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
Visits a PutDataMapCommand. |
Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
Visits a PutKeyValueCommand. |
Object |
visitRemoveDataCommand(InvocationContext ctx,
RemoveDataCommand command)
Visits a RemoveDataCommand. |
Object |
visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
Visits a RemoveKeyCommand. |
Object |
visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
Visits a RemoveNodeCommand. |
Object |
visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
Visits a RollbackCommand. |
Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
visitCollection, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvocationContextInterceptor
public InvocationContextInterceptor()
setDependencies
public void setDependencies(RPCManager rpcManager)
visitPutDataMapCommand
public Object visitPutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a PutDataMapCommand.
- Specified by:
visitPutDataMapCommand
in interface Visitor
- Overrides:
visitPutDataMapCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a PutKeyValueCommand.
- Specified by:
visitPutKeyValueCommand
in interface Visitor
- Overrides:
visitPutKeyValueCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitRemoveNodeCommand
public Object visitRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a RemoveNodeCommand.
- Specified by:
visitRemoveNodeCommand
in interface Visitor
- Overrides:
visitRemoveNodeCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitRemoveDataCommand
public Object visitRemoveDataCommand(InvocationContext ctx,
RemoveDataCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a RemoveDataCommand.
- Specified by:
visitRemoveDataCommand
in interface Visitor
- Overrides:
visitRemoveDataCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitRemoveKeyCommand
public Object visitRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a RemoveKeyCommand.
- Specified by:
visitRemoveKeyCommand
in interface Visitor
- Overrides:
visitRemoveKeyCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitPrepareCommand
public Object visitPrepareCommand(InvocationContext ctx,
PrepareCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a PrepareCommand.
- Specified by:
visitPrepareCommand
in interface Visitor
- Overrides:
visitPrepareCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitRollbackCommand
public Object visitRollbackCommand(InvocationContext ctx,
RollbackCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a RollbackCommand.
- Specified by:
visitRollbackCommand
in interface Visitor
- Overrides:
visitRollbackCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitCommitCommand
public Object visitCommitCommand(InvocationContext ctx,
CommitCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a CommitCommand.
- Specified by:
visitCommitCommand
in interface Visitor
- Overrides:
visitCommitCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
visitOptimisticPrepareCommand
public Object visitOptimisticPrepareCommand(InvocationContext ctx,
OptimisticPrepareCommand command)
throws Throwable
- Description copied from interface:
Visitor
- Visits a OptimisticPrepareCommand.
- Specified by:
visitOptimisticPrepareCommand
in interface Visitor
- Overrides:
visitOptimisticPrepareCommand
in class AbstractVisitor
- Parameters:
ctx
- invocation contextcommand
- command to visit
- Returns:
- response from the visit
- Throws:
Throwable
- in the event of problems.
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 contextcommand
- command to invoke
- Returns:
- return value
- Throws:
Throwable
- in the event of problems
handleAll
public Object handleAll(InvocationContext ctx,
VisitableCommand command,
GlobalTransaction gtx)
throws Throwable
- Throws:
Throwable
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.