summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity/CorbaServer.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-05-07 17:33:13 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-05-08 16:37:39 +0200
commita1f0ecbb6a2bea6aa214322c412af2f3c5ce124b (patch)
tree4d74229b6dd9cfd7ce054e06bf740b9a63a578d6 /src/main/java/com/c2kernel/entity/CorbaServer.java
parent6dfa1bbe05a712174e937af89d5223e98d9d7d06 (diff)
Agent now extends Item, so they can have workflows. All traces of the
old 'Entity' superclasses should be removed, including proxies and paths. Very large change, breaks API compatibility with CRISTAL 2.x. Fixes #135
Diffstat (limited to 'src/main/java/com/c2kernel/entity/CorbaServer.java')
-rw-r--r--src/main/java/com/c2kernel/entity/CorbaServer.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/entity/CorbaServer.java b/src/main/java/com/c2kernel/entity/CorbaServer.java
index 3d7c79b..4a129ae 100644
--- a/src/main/java/com/c2kernel/entity/CorbaServer.java
+++ b/src/main/java/com/c2kernel/entity/CorbaServer.java
@@ -14,8 +14,8 @@ import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.entity.agent.ActiveEntity;
import com.c2kernel.entity.agent.ActiveLocator;
import com.c2kernel.lookup.AgentPath;
-import com.c2kernel.lookup.EntityPath;
-import com.c2kernel.lookup.InvalidEntityPathException;
+import com.c2kernel.lookup.ItemPath;
+import com.c2kernel.lookup.InvalidItemPathException;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
import com.c2kernel.utils.SoftCache;
@@ -31,14 +31,14 @@ import com.c2kernel.utils.SoftCache;
public class CorbaServer {
- private final Map<EntityPath, Servant> mEntityCache;
+ private final Map<ItemPath, Servant> mEntityCache;
private POA mRootPOA;
private POA mItemPOA;
private POA mAgentPOA;
private POAManager mPOAManager;
public CorbaServer() throws InvalidDataException {
- mEntityCache = new SoftCache<EntityPath, Servant>(50);
+ mEntityCache = new SoftCache<ItemPath, Servant>(50);
// init POA
try {
@@ -119,7 +119,7 @@ public class CorbaServer {
**************************************************************************/
private Servant getEntity(int sysKey, org.omg.PortableServer.POA poa) throws ObjectNotFoundException {
try {
- EntityPath entityPath = new EntityPath(sysKey);
+ ItemPath entityPath = new ItemPath(sysKey);
Servant entity = null;
synchronized (mEntityCache) {
entity = mEntityCache.get(entityPath);
@@ -141,7 +141,7 @@ public class CorbaServer {
}
return entity;
- } catch (InvalidEntityPathException ex) {
+ } catch (InvalidItemPathException ex) {
throw new ObjectNotFoundException("Invalid Entity Key", "");
}
}
@@ -164,7 +164,7 @@ public class CorbaServer {
* @param entityPath
* @return
*/
- public Servant createEntity(EntityPath entityPath) throws CannotManageException, ObjectAlreadyExistsException {
+ public Servant createEntity(ItemPath entityPath) throws CannotManageException, ObjectAlreadyExistsException {
try {
if (entityPath == null)
entityPath = Gateway.getLDAPLookup().getNextKeyManager().generateNextEntityKey();