Class DefaultReadyAction
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.action.DefaultReadyAction
-
- All Implemented Interfaces:
ActionListener
,ReadyAction
public class DefaultReadyAction extends java.lang.Object implements ReadyAction, ActionListener
A list ofAction
to be executed to check when it is ready. If anAction
is canceled, then the remainingAction
are not invoked.- Since:
- 8.0
- Author:
- Pedro Ruivo
-
-
Constructor Summary
Constructors Constructor Description DefaultReadyAction(ActionState state, Action... actions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ActionListener listener)
It adds a listener that is invoked when this action is ready.boolean
isReady()
void
onComplete()
Invoked when anAction
is completed.void
onException()
Cleanup when the command throws an exception while executing.void
onFinally()
Invoked always after the command is executed and the reply is sent.void
registerListener()
-
-
-
Constructor Detail
-
DefaultReadyAction
public DefaultReadyAction(ActionState state, Action... actions)
-
-
Method Detail
-
registerListener
public void registerListener()
-
isReady
public boolean isReady()
- Specified by:
isReady
in interfaceReadyAction
- Returns:
true
if ready.
-
addListener
public void addListener(ActionListener listener)
Description copied from interface:ReadyAction
It adds a listener that is invoked when this action is ready.- Specified by:
addListener
in interfaceReadyAction
- Parameters:
listener
- the listener to invoke.
-
onException
public void onException()
Description copied from interface:ReadyAction
Cleanup when the command throws an exception while executing.- Specified by:
onException
in interfaceReadyAction
-
onComplete
public void onComplete()
Description copied from interface:ActionListener
Invoked when anAction
is completed.- Specified by:
onComplete
in interfaceActionListener
-
onFinally
public void onFinally()
Description copied from interface:ReadyAction
Invoked always after the command is executed and the reply is sent.- Specified by:
onFinally
in interfaceReadyAction
-
-