From b68ea0f2b12c4c5189c5fc7c182a1b242dc63579 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 23:18:47 +0200 Subject: Rolled back the renaming of existing exceptions. --- src/main/java/com/c2kernel/entity/CorbaServer.java | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/CorbaServer.java') diff --git a/src/main/java/com/c2kernel/entity/CorbaServer.java b/src/main/java/com/c2kernel/entity/CorbaServer.java index 76637c6..22b8e13 100644 --- a/src/main/java/com/c2kernel/entity/CorbaServer.java +++ b/src/main/java/com/c2kernel/entity/CorbaServer.java @@ -27,10 +27,10 @@ import org.omg.PortableServer.POAManager; import org.omg.PortableServer.Servant; import org.omg.PortableServer.POAManagerPackage.AdapterInactive; -import com.c2kernel.common.CannotManage; -import com.c2kernel.common.InvalidData; -import com.c2kernel.common.ObjectAlreadyExists; -import com.c2kernel.common.ObjectNotFound; +import com.c2kernel.common.CannotManageException; +import com.c2kernel.common.InvalidDataException; +import com.c2kernel.common.ObjectAlreadyExistsException; +import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.entity.agent.ActiveEntity; import com.c2kernel.entity.agent.ActiveLocator; import com.c2kernel.lookup.AgentPath; @@ -57,7 +57,7 @@ public class CorbaServer { private POA mAgentPOA; private POAManager mPOAManager; - public CorbaServer() throws InvalidData { + public CorbaServer() throws InvalidDataException { mItemCache = new SoftCache(50); // init POA @@ -66,7 +66,7 @@ public class CorbaServer { mPOAManager.activate(); } catch (Exception ex) { Logger.error(ex); - throw new InvalidData("Error initialising POA"); + throw new InvalidDataException("Error initialising POA"); } new Thread(new Runnable() { @@ -136,11 +136,11 @@ public class CorbaServer { /************************************************************************** * Returns a CORBA servant for a pre-existing entity - * @throws ObjectNotFound + * @throws ObjectNotFoundException **************************************************************************/ - public TraceableEntity getItem(ItemPath itemPath) throws ObjectNotFound { + public TraceableEntity getItem(ItemPath itemPath) throws ObjectNotFoundException { Servant item = null; - if (!itemPath.exists()) throw new ObjectNotFound(itemPath+" does not exist"); + if (!itemPath.exists()) throw new ObjectNotFoundException(itemPath+" does not exist"); synchronized (mItemCache) { item = mItemCache.get(itemPath); if (item == null) { @@ -155,9 +155,9 @@ public class CorbaServer { /************************************************************************** * Returns a CORBA servant for a pre-existing entity **************************************************************************/ - public ActiveEntity getAgent(AgentPath agentPath) throws InvalidAgentPathException, ObjectNotFound { + public ActiveEntity getAgent(AgentPath agentPath) throws InvalidAgentPathException, ObjectNotFoundException { Servant agent = null; - if (!agentPath.exists()) throw new ObjectNotFound(agentPath+" does not exist"); + if (!agentPath.exists()) throw new ObjectNotFoundException(agentPath+" does not exist"); synchronized (mItemCache) { agent = mItemCache.get(agentPath); if (agent == null) { @@ -175,9 +175,9 @@ public class CorbaServer { * @param itemPath * @return */ - public TraceableEntity createItem(ItemPath itemPath) throws CannotManage, ObjectAlreadyExists { + public TraceableEntity createItem(ItemPath itemPath) throws CannotManageException, ObjectAlreadyExistsException { - if (itemPath.exists()) throw new ObjectAlreadyExists(); + if (itemPath.exists()) throw new ObjectAlreadyExistsException(); org.omg.CORBA.Object obj = mItemPOA.create_reference_with_id(itemPath.getOID(), ItemHelper.id()); itemPath.setIOR(obj); TraceableEntity item = new TraceableEntity(itemPath, mItemPOA); @@ -187,8 +187,8 @@ public class CorbaServer { return item; } - public ActiveEntity createAgent(AgentPath agentPath) throws CannotManage, ObjectAlreadyExists { - if (agentPath.exists()) throw new ObjectAlreadyExists(); + public ActiveEntity createAgent(AgentPath agentPath) throws CannotManageException, ObjectAlreadyExistsException { + if (agentPath.exists()) throw new ObjectAlreadyExistsException(); org.omg.CORBA.Object obj = mAgentPOA.create_reference_with_id(agentPath.getOID(), AgentHelper.id()); agentPath.setIOR(obj); ActiveEntity agent; -- cgit v1.2.3