Class AbstractDelegatingHandler
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.AbstractDelegatingHandler
-
- All Implemented Interfaces:
PerCacheInboundInvocationHandler
public abstract class AbstractDelegatingHandler extends Object implements PerCacheInboundInvocationHandler
Class to be extended to allow some control over thePerCacheInboundInvocationHandler
in tests.- Since:
- 7.1
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description protected PerCacheInboundInvocationHandler
delegate
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDelegatingHandler(PerCacheInboundInvocationHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterHandle(CacheRpcCommand command, DeliverOrder order, boolean delegated)
Invoked after the command is handled.protected boolean
beforeHandle(CacheRpcCommand command, Reply reply, DeliverOrder order)
Invoked before the command is handled by the realPerCacheInboundInvocationHandler
.void
handle(CacheRpcCommand command, Reply reply, DeliverOrder order)
Handles theCacheRpcCommand
from other node.
-
-
-
Field Detail
-
delegate
protected final PerCacheInboundInvocationHandler delegate
-
-
Constructor Detail
-
AbstractDelegatingHandler
protected AbstractDelegatingHandler(PerCacheInboundInvocationHandler delegate)
-
-
Method Detail
-
handle
public void handle(CacheRpcCommand command, Reply reply, DeliverOrder order)
Description copied from interface:PerCacheInboundInvocationHandler
Handles theCacheRpcCommand
from other node.- Specified by:
handle
in interfacePerCacheInboundInvocationHandler
- Parameters:
command
- theCacheRpcCommand
to handle-reply
- the return value is passed to this object in order to be sent back to the senderorder
- theDeliverOrder
in which the command was sent
-
beforeHandle
protected boolean beforeHandle(CacheRpcCommand command, Reply reply, DeliverOrder order)
Invoked before the command is handled by the realPerCacheInboundInvocationHandler
.- Returns:
true
if the command should be handled by the readPerCacheInboundInvocationHandler
,false
otherwise.
-
afterHandle
protected void afterHandle(CacheRpcCommand command, DeliverOrder order, boolean delegated)
Invoked after the command is handled.- Parameters:
delegated
-true
if the command was handled by the realPerCacheInboundInvocationHandler
,false
otherwise.
-
-