From da731d2bb81666b9c697d9099da632e7dfcdc0f7 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Tue, 9 Sep 2014 12:13:21 +0200 Subject: Replaced int sysKey Item identifier with UUID, which is now portable. ItemPath objects are now used to identify Items throughout the kernel, replacing ints and Integers. --- .../java/com/c2kernel/entity/agent/ActiveEntity.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/agent/ActiveEntity.java') diff --git a/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java b/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java index a799b62..ca7431c 100644 --- a/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java +++ b/src/main/java/com/c2kernel/entity/agent/ActiveEntity.java @@ -17,8 +17,9 @@ import com.c2kernel.common.InvalidTransitionException; import com.c2kernel.common.ObjectAlreadyExistsException; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.common.PersistencyException; -import com.c2kernel.entity.AgentImplementation; +import com.c2kernel.common.SystemKey; import com.c2kernel.entity.AgentPOA; +import com.c2kernel.lookup.AgentPath; import com.c2kernel.utils.Logger; /************************************************************************** @@ -33,8 +34,8 @@ public class ActiveEntity extends AgentPOA private final org.omg.PortableServer.POA mPoa; private final AgentImplementation mAgentImpl; - public ActiveEntity( int key, - org.omg.PortableServer.POA poa ) + public ActiveEntity( AgentPath key, + org.omg.PortableServer.POA poa ) { Logger.msg(5, "ActiveEntity::constructor() - SystemKey:" + key ); mPoa = poa; @@ -61,7 +62,7 @@ public class ActiveEntity extends AgentPOA * **************************************************************************/ @Override - public int getSystemKey() + public SystemKey getSystemKey() { return mAgentImpl.getSystemKey(); } @@ -89,7 +90,7 @@ public class ActiveEntity extends AgentPOA */ @Override - public void refreshJobList(int sysKey, String stepPath, String newJobs) { + public void refreshJobList(SystemKey sysKey, String stepPath, String newJobs) { synchronized (this) { mAgentImpl.refreshJobList(sysKey, stepPath, newJobs); } @@ -110,7 +111,7 @@ public class ActiveEntity extends AgentPOA } @Override - public void initialise(int agentId, String propString, String initWfString, + public void initialise(SystemKey agentId, String propString, String initWfString, String initCollsString) throws AccessRightsException, InvalidDataException, PersistencyException, ObjectNotFoundException { synchronized (this) { @@ -120,7 +121,7 @@ public class ActiveEntity extends AgentPOA } @Override - public String requestAction(int agentID, String stepPath, int transitionID, + public String requestAction(SystemKey agentID, String stepPath, int transitionID, String requestData) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, @@ -133,7 +134,7 @@ public class ActiveEntity extends AgentPOA } @Override - public String queryLifeCycle(int agentId, boolean filter) + public String queryLifeCycle(SystemKey agentId, boolean filter) throws AccessRightsException, ObjectNotFoundException, PersistencyException { synchronized (this) { -- cgit v1.2.3