Package jade.core.replication
Class AgentReplicationHandle
- java.lang.Object
-
- jade.core.replication.AgentReplicationHandle
-
public class AgentReplicationHandle extends Object
Utility class the provides simplified access to the method-replication feature of the AgentReplicationService.
-
-
Constructor Summary
Constructors Constructor Description AgentReplicationHandle()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisReplicatedCall()Checks whether we are inside the execution of a replicated or original call.static voidreplicate(Agent a, String methodName, Object[] arguments)Utility method to be called at the beginning of each replicated method as exemplified below
public void aReplicatedMethod(T1 a, T2 b) { AgentReplicationHandle.replicate(this, "aReplicatedMethod", new Object[]{a, b}); ...
-
-
-
Method Detail
-
replicate
public static void replicate(Agent a, String methodName, Object[] arguments)
Utility method to be called at the beginning of each replicated method as exemplified below
public void aReplicatedMethod(T1 a, T2 b) { AgentReplicationHandle.replicate(this, "aReplicatedMethod", new Object[]{a, b}); ... }- Parameters:
a- The agent providing the replicated methodmethodName- The name of the replicated methodarguments- The arguments passed to the replicated method
-
isReplicatedCall
public static boolean isReplicatedCall()
Checks whether we are inside the execution of a replicated or original call.
-
-