summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity/proxy
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-10-03 23:18:47 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-10-03 23:18:47 +0200
commitb68ea0f2b12c4c5189c5fc7c182a1b242dc63579 (patch)
tree85b1cc4713ba978c044bfa0656f9115c9f9bf9e3 /src/main/java/com/c2kernel/entity/proxy
parent275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (diff)
Rolled back the renaming of existing exceptions.
Diffstat (limited to 'src/main/java/com/c2kernel/entity/proxy')
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/AgentProxy.java94
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ItemProxy.java66
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/MemberSubscription.java6
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ProxyClientConnection.java6
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ProxyManager.java14
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ProxyMessage.java10
-rw-r--r--src/main/java/com/c2kernel/entity/proxy/ProxyServerConnection.java4
7 files changed, 100 insertions, 100 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java b/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java
index 7e6b3e4..df26ab5 100644
--- a/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java
+++ b/src/main/java/com/c2kernel/entity/proxy/AgentProxy.java
@@ -25,10 +25,10 @@ import java.util.Iterator;
import com.c2kernel.common.AccessRightsException;
import com.c2kernel.common.InvalidCollectionModification;
-import com.c2kernel.common.InvalidData;
-import com.c2kernel.common.InvalidTransition;
-import com.c2kernel.common.ObjectAlreadyExists;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.InvalidTransitionException;
+import com.c2kernel.common.ObjectAlreadyExistsException;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.common.PersistencyException;
import com.c2kernel.entity.Agent;
import com.c2kernel.entity.AgentHelper;
@@ -69,7 +69,7 @@ public class AgentProxy extends ItemProxy
**************************************************************************/
protected AgentProxy( org.omg.CORBA.Object ior,
AgentPath agentPath)
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
super(ior, agentPath);
mAgentPath = agentPath;
@@ -84,12 +84,12 @@ public class AgentProxy extends ItemProxy
}
@Override
- public Agent narrow() throws ObjectNotFound
+ public Agent narrow() throws ObjectNotFoundException
{
try {
return AgentHelper.narrow(mIOR);
} catch (org.omg.CORBA.BAD_PARAM ex) { }
- throw new ObjectNotFound("CORBA Object was not an Agent, or the server is down.");
+ throw new ObjectNotFoundException("CORBA Object was not an Agent, or the server is down.");
}
/**
@@ -98,21 +98,21 @@ public class AgentProxy extends ItemProxy
*
* @param job
* @throws AccessRightsException
- * @throws InvalidData
- * @throws InvalidTransition
- * @throws ObjectNotFound
+ * @throws InvalidDataException
+ * @throws InvalidTransitionException
+ * @throws ObjectNotFoundException
* @throws PersistencyException
- * @throws ObjectAlreadyExists
+ * @throws ObjectAlreadyExistsException
* @throws ScriptErrorException
* @throws InvalidCollectionModification
*/
public String execute(Job job)
throws AccessRightsException,
- InvalidData,
- InvalidTransition,
- ObjectNotFound,
+ InvalidDataException,
+ InvalidTransitionException,
+ ObjectNotFoundException,
PersistencyException,
- ObjectAlreadyExists,
+ ObjectAlreadyExistsException,
ScriptErrorException, InvalidCollectionModification
{
ItemProxy item = Gateway.getProxyManager().getProxy(job.getItemPath());
@@ -130,12 +130,12 @@ public class AgentProxy extends ItemProxy
Schema schema = LocalObjectLoader.getSchema(schemaName, schemaVersion);
if (schema == null)
- throw new InvalidData("Job references outcome type "+schemaName+" version "+schemaVersion+" that does not exist in this centre.");
+ throw new InvalidDataException("Job references outcome type "+schemaName+" version "+schemaVersion+" that does not exist in this centre.");
try {
validator = OutcomeValidator.getValidator(schema);
} catch (Exception e) {
- throw new InvalidData("Could not create validator: "+e.getMessage());
+ throw new InvalidDataException("Could not create validator: "+e.getMessage());
}
}
@@ -149,7 +149,7 @@ public class AgentProxy extends ItemProxy
String error = validator.validate(job.getOutcomeString());
if (error.length() > 0) {
Logger.error("Outcome not valid: \n " + error);
- throw new InvalidData(error);
+ throw new InvalidDataException(error);
}
}
@@ -164,7 +164,7 @@ public class AgentProxy extends ItemProxy
Logger.warning("Script errors: "+errorString);
} catch (ScriptingEngineException ex) {
Logger.error(ex);
- throw new InvalidData(ex.getMessage());
+ throw new InvalidDataException(ex.getMessage());
}
}
@@ -172,7 +172,7 @@ public class AgentProxy extends ItemProxy
Logger.msg(3, "AgentProxy - validating outcome");
String error = validator.validate(job.getOutcomeString());
if (error.length() > 0)
- throw new InvalidData(error);
+ throw new InvalidDataException(error);
}
job.setAgentPath(mAgentPath);
@@ -194,18 +194,18 @@ public class AgentProxy extends ItemProxy
public String execute(ItemProxy item, String predefStep, C2KLocalObject obj)
throws AccessRightsException,
- InvalidData,
- InvalidTransition,
- ObjectNotFound,
+ InvalidDataException,
+ InvalidTransitionException,
+ ObjectNotFoundException,
PersistencyException,
- ObjectAlreadyExists, InvalidCollectionModification
+ ObjectAlreadyExistsException, InvalidCollectionModification
{
String param;
try {
param = marshall(obj);
} catch (Exception ex) {
Logger.error(ex);
- throw new InvalidData("Error on marshall");
+ throw new InvalidDataException("Error on marshall");
}
return execute(item, predefStep, param);
}
@@ -222,20 +222,20 @@ public class AgentProxy extends ItemProxy
* @return The outcome after processing. May have been altered by the step.
*
* @throws AccessRightsException The agent was not allowed to execute this step
- * @throws InvalidData The parameters supplied were incorrect
- * @throws InvalidTransition The step wasn't available
- * @throws ObjectNotFound Thrown by some steps that try to locate additional objects
+ * @throws InvalidDataException The parameters supplied were incorrect
+ * @throws InvalidTransitionException The step wasn't available
+ * @throws ObjectNotFoundException Thrown by some steps that try to locate additional objects
* @throws PersistencyException Problem writing or reading the database
- * @throws ObjectAlreadyExists Thrown by steps that create additional object
+ * @throws ObjectAlreadyExistsException Thrown by steps that create additional object
* @throws InvalidCollectionModification
*/
public String execute(ItemProxy item, String predefStep, String[] params)
throws AccessRightsException,
- InvalidData,
- InvalidTransition,
- ObjectNotFound,
+ InvalidDataException,
+ InvalidTransitionException,
+ ObjectNotFoundException,
PersistencyException,
- ObjectAlreadyExists, InvalidCollectionModification
+ ObjectAlreadyExistsException, InvalidCollectionModification
{
String schemaName = PredefinedStep.getPredefStepSchemaName(predefStep);
String param;
@@ -257,21 +257,21 @@ public class AgentProxy extends ItemProxy
* @param param
* @return
* @throws AccessRightsException
- * @throws InvalidData
- * @throws InvalidTransition
- * @throws ObjectNotFound
+ * @throws InvalidDataException
+ * @throws InvalidTransitionException
+ * @throws ObjectNotFoundException
* @throws PersistencyException
- * @throws ObjectAlreadyExists
+ * @throws ObjectAlreadyExistsException
* @throws InvalidCollectionModification
*/
public String execute(ItemProxy item, String predefStep, String param)
throws AccessRightsException,
- InvalidData,
- InvalidTransition,
- ObjectNotFound,
+ InvalidDataException,
+ InvalidTransitionException,
+ ObjectNotFoundException,
PersistencyException,
- ObjectAlreadyExists, InvalidCollectionModification
+ ObjectAlreadyExistsException, InvalidCollectionModification
{
return execute(item, predefStep, new String[] {param });
}
@@ -286,24 +286,24 @@ public class AgentProxy extends ItemProxy
}
/** Let scripts resolve items */
- public ItemProxy searchItem(String name) throws ObjectNotFound {
+ public ItemProxy searchItem(String name) throws ObjectNotFoundException {
Iterator<Path> results = Gateway.getLookup().search(new DomainPath(""),name);
Path returnPath = null;
if (!results.hasNext())
- throw new ObjectNotFound(name);
+ throw new ObjectNotFoundException(name);
while(results.hasNext()) {
Path nextMatch = results.next();
if (returnPath != null && nextMatch.getUUID() != null && !returnPath.getUUID().equals(nextMatch.getUUID()))
- throw new ObjectNotFound("Too many items with that name");
+ throw new ObjectNotFoundException("Too many items with that name");
returnPath = nextMatch;
}
return Gateway.getProxyManager().getProxy(returnPath);
}
- public ItemProxy getItem(String itemPath) throws ObjectNotFound {
+ public ItemProxy getItem(String itemPath) throws ObjectNotFoundException {
return (getItem(new DomainPath(itemPath)));
}
@@ -312,11 +312,11 @@ public class AgentProxy extends ItemProxy
return mAgentPath;
}
- public ItemProxy getItem(Path itemPath) throws ObjectNotFound {
+ public ItemProxy getItem(Path itemPath) throws ObjectNotFoundException {
return Gateway.getProxyManager().getProxy(itemPath);
}
- public ItemProxy getItemByUUID(String uuid) throws ObjectNotFound, InvalidItemPathException {
+ public ItemProxy getItemByUUID(String uuid) throws ObjectNotFoundException, InvalidItemPathException {
return Gateway.getProxyManager().getProxy(new ItemPath(uuid));
}
}
diff --git a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
index f5b0be7..7a2d930 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java
@@ -33,10 +33,10 @@ import com.c2kernel.collection.Collection;
import com.c2kernel.collection.CollectionArrayList;
import com.c2kernel.common.AccessRightsException;
import com.c2kernel.common.InvalidCollectionModification;
-import com.c2kernel.common.InvalidData;
-import com.c2kernel.common.InvalidTransition;
-import com.c2kernel.common.ObjectAlreadyExists;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.InvalidTransitionException;
+import com.c2kernel.common.ObjectAlreadyExistsException;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.common.PersistencyException;
import com.c2kernel.entity.C2KLocalObject;
import com.c2kernel.entity.Item;
@@ -89,18 +89,18 @@ public class ItemProxy
return mItemPath;
}
- protected Item getItem() throws ObjectNotFound {
+ protected Item getItem() throws ObjectNotFoundException {
if (mItem == null)
mItem = narrow();
return mItem;
}
- public Item narrow() throws ObjectNotFound
+ public Item narrow() throws ObjectNotFoundException
{
try {
return ItemHelper.narrow(mIOR);
} catch (org.omg.CORBA.BAD_PARAM ex) { }
- throw new ObjectNotFound("CORBA Object was not an Item, or the server is down.");
+ throw new ObjectNotFoundException("CORBA Object was not an Item, or the server is down.");
}
public void initialise( AgentPath agentId,
@@ -108,11 +108,11 @@ public class ItemProxy
CompositeActivity workflow,
CollectionArrayList colls
)
- throws AccessRightsException, InvalidData, PersistencyException, ObjectNotFound, MarshalException, ValidationException, IOException, MappingException, InvalidCollectionModification
+ throws AccessRightsException, InvalidDataException, PersistencyException, ObjectNotFoundException, MarshalException, ValidationException, IOException, MappingException, InvalidCollectionModification
{
Logger.msg(7, "ItemProxy::initialise - started");
CastorXMLUtility xml = Gateway.getMarshaller();
- if (itemProps == null) throw new InvalidData("No initial properties supplied");
+ if (itemProps == null) throw new InvalidDataException("No initial properties supplied");
String propString = xml.marshall(itemProps);
String wfString = "";
if (workflow != null) wfString = xml.marshall(workflow);
@@ -124,7 +124,7 @@ public class ItemProxy
public void setProperty(AgentProxy agent, String name, String value)
throws AccessRightsException,
- PersistencyException, InvalidData
+ PersistencyException, InvalidDataException
{
String[] params = new String[2];
params[0] = name;
@@ -135,7 +135,7 @@ public class ItemProxy
throw (e);
} catch (PersistencyException e) {
throw (e);
- } catch (InvalidData e) {
+ } catch (InvalidDataException e) {
throw (e);
} catch (Exception e) {
Logger.error(e);
@@ -149,23 +149,23 @@ public class ItemProxy
**************************************************************************/
public String requestAction( Job thisJob )
throws AccessRightsException,
- InvalidTransition,
- ObjectNotFound,
- InvalidData,
+ InvalidTransitionException,
+ ObjectNotFoundException,
+ InvalidDataException,
PersistencyException,
- ObjectAlreadyExists,
+ ObjectAlreadyExistsException,
InvalidCollectionModification
{
String outcome = thisJob.getOutcomeString();
// check fields that should have been filled in
if (outcome==null)
if (thisJob.isOutcomeRequired())
- throw new InvalidData("Outcome is required.");
+ throw new InvalidDataException("Outcome is required.");
else
outcome="";
if (thisJob.getAgentPath() == null)
- throw new InvalidData("No Agent specified.");
+ throw new InvalidDataException("No Agent specified.");
Logger.msg(7, "ItemProxy - executing "+thisJob.getStepPath()+" for "+thisJob.getAgentName());
return getItem().requestAction (thisJob.getAgentPath().getSystemKey(), thisJob.getStepPath(),
@@ -177,7 +177,7 @@ public class ItemProxy
**************************************************************************/
private ArrayList<Job> getJobList(AgentPath agentPath, boolean filter)
throws AccessRightsException,
- ObjectNotFound,
+ ObjectNotFoundException,
PersistencyException
{
JobArrayList thisJobList;
@@ -194,7 +194,7 @@ public class ItemProxy
public ArrayList<Job> getJobList(AgentProxy agent)
throws AccessRightsException,
- ObjectNotFound,
+ ObjectNotFoundException,
PersistencyException
{
return getJobList(agent.getPath(), true);
@@ -202,7 +202,7 @@ public class ItemProxy
private Job getJobByName(String actName, AgentPath agent)
throws AccessRightsException,
- ObjectNotFound,
+ ObjectNotFoundException,
PersistencyException {
ArrayList<Job> jobList = getJobList(agent, true);
@@ -214,21 +214,21 @@ public class ItemProxy
}
- public Collection<?> getCollection(String collName) throws ObjectNotFound {
+ public Collection<?> getCollection(String collName) throws ObjectNotFoundException {
return (Collection<?>)getObject(ClusterStorage.COLLECTION+"/"+collName+"/last");
}
- public Workflow getWorkflow() throws ObjectNotFound {
+ public Workflow getWorkflow() throws ObjectNotFoundException {
return (Workflow)getObject(ClusterStorage.LIFECYCLE+"/workflow");
}
- public Viewpoint getViewpoint(String schemaName, String viewName) throws ObjectNotFound {
+ public Viewpoint getViewpoint(String schemaName, String viewName) throws ObjectNotFoundException {
return (Viewpoint)getObject(ClusterStorage.VIEWPOINT+"/"+schemaName+"/"+viewName);
}
public Job getJobByName(String actName, AgentProxy agent)
throws AccessRightsException,
- ObjectNotFound,
+ ObjectNotFoundException,
PersistencyException {
return getJobByName(actName, agent.getPath());
}
@@ -248,7 +248,7 @@ public class ItemProxy
*
**************************************************************************/
public String queryData( String path )
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
try {
@@ -266,7 +266,7 @@ public class ItemProxy
}
C2KLocalObject target = Gateway.getStorage().get(mItemPath, path, null);
return Gateway.getMarshaller().marshall(target);
- } catch (ObjectNotFound e) {
+ } catch (ObjectNotFoundException e) {
throw e;
} catch (Exception e) {
Logger.error(e);
@@ -274,11 +274,11 @@ public class ItemProxy
}
}
- public String[] getContents( String path ) throws ObjectNotFound {
+ public String[] getContents( String path ) throws ObjectNotFoundException {
try {
return Gateway.getStorage().getClusterContents(mItemPath, path.substring(0, path.length()));
} catch (PersistencyException e) {
- throw new ObjectNotFound(e.toString());
+ throw new ObjectNotFoundException(e.toString());
}
}
@@ -287,7 +287,7 @@ public class ItemProxy
*
**************************************************************************/
public C2KLocalObject getObject( String xpath )
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
// load from storage, falling back to proxy loader if not found in others
try
@@ -297,14 +297,14 @@ public class ItemProxy
catch( PersistencyException ex )
{
Logger.msg(4, "Exception loading object :"+mItemPath+"/"+xpath);
- throw new ObjectNotFound( ex.toString() );
+ throw new ObjectNotFoundException( ex.toString() );
}
}
public String getProperty( String name )
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
Logger.msg(5, "Get property "+name+" from item "+mItemPath);
Property prop = (Property)getObject("Property/"+name);
@@ -314,7 +314,7 @@ public class ItemProxy
}
catch (NullPointerException ex)
{
- throw new ObjectNotFound();
+ throw new ObjectNotFoundException();
}
}
@@ -322,7 +322,7 @@ public class ItemProxy
{
try {
return getProperty("Name");
- } catch (ObjectNotFound ex) {
+ } catch (ObjectNotFoundException ex) {
return null;
}
}
diff --git a/src/main/java/com/c2kernel/entity/proxy/MemberSubscription.java b/src/main/java/com/c2kernel/entity/proxy/MemberSubscription.java
index 5e063ed..60e5233 100644
--- a/src/main/java/com/c2kernel/entity/proxy/MemberSubscription.java
+++ b/src/main/java/com/c2kernel/entity/proxy/MemberSubscription.java
@@ -23,7 +23,7 @@ import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.StringTokenizer;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.entity.C2KLocalObject;
import com.c2kernel.utils.Logger;
@@ -70,7 +70,7 @@ public class MemberSubscription<C extends C2KLocalObject> implements Runnable {
newMember = (C)subject.getObject(interest+"/"+newChild);
contents.remove(newChild);
observer.add(newMember);
- } catch (ObjectNotFound ex) {
+ } catch (ObjectNotFoundException ex) {
observer.control(ERROR, "Listed member "+newChild+" was not found.");
} catch (ClassCastException ex) {
Logger.error(ex);
@@ -117,7 +117,7 @@ public class MemberSubscription<C extends C2KLocalObject> implements Runnable {
Logger.msg(4, "Adding "+path);
contents.add(name);
observer.add(newMember);
- } catch (ObjectNotFound e) {
+ } catch (ObjectNotFoundException e) {
Logger.error("Member Subscription: could not load "+path);
Logger.error(e);
}
diff --git a/src/main/java/com/c2kernel/entity/proxy/ProxyClientConnection.java b/src/main/java/com/c2kernel/entity/proxy/ProxyClientConnection.java
index 02dc665..4aff44b 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ProxyClientConnection.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ProxyClientConnection.java
@@ -30,7 +30,7 @@ import java.net.SocketException;
import java.util.ArrayList;
import java.util.Iterator;
-import com.c2kernel.common.InvalidData;
+import com.c2kernel.common.InvalidDataException;
import com.c2kernel.lookup.ItemPath;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
@@ -110,7 +110,7 @@ public class ProxyClientConnection implements SocketHandler {
thisMessage = new ProxyMessage(input);
processMessage(thisMessage);
} catch (InterruptedIOException ex) { //timeout
- } catch (InvalidData ex) { // invalid proxy message
+ } catch (InvalidDataException ex) { // invalid proxy message
Logger.error("ProxyClientConnection "+thisClientId+" - Invalid proxy message: "+input);
}
@@ -123,7 +123,7 @@ public class ProxyClientConnection implements SocketHandler {
Logger.msg(1, "ProxyClientConnection "+thisClientId+" closed.");
}
- private void processMessage(ProxyMessage message) throws InvalidData {
+ private void processMessage(ProxyMessage message) throws InvalidDataException {
// proxy disconnection
if (message.getPath().equals(ProxyMessage.BYEPATH)) {
diff --git a/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java b/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
index 8824951..aa38ea8 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ProxyManager.java
@@ -25,8 +25,8 @@ import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.Iterator;
-import com.c2kernel.common.InvalidData;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.lookup.DomainPath;
import com.c2kernel.lookup.ItemPath;
@@ -103,7 +103,7 @@ public class ProxyManager
}
}
- protected void processMessage(ProxyMessage thisMessage) throws InvalidData {
+ protected void processMessage(ProxyMessage thisMessage) throws InvalidDataException {
if (Logger.doLog(9)) Logger.msg(9, thisMessage.toString());
if (thisMessage.getPath().equals(ProxyMessage.PINGPATH)) // ping response
@@ -166,7 +166,7 @@ public class ProxyManager
**************************************************************************/
private ItemProxy createProxy( org.omg.CORBA.Object ior,
ItemPath itemPath)
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
ItemProxy newProxy = null;
@@ -201,7 +201,7 @@ public class ProxyManager
**************************************************************************/
private ItemProxy getProxy( org.omg.CORBA.Object ior,
ItemPath itemPath)
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
synchronized(proxyPool) {
@@ -224,7 +224,7 @@ public class ProxyManager
* Proxy from Alias
**************************************************************************/
public ItemProxy getProxy( Path path )
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
ItemPath itemPath;
if (path instanceof ItemPath) itemPath = (ItemPath)path;
@@ -236,7 +236,7 @@ public class ProxyManager
}
public AgentProxy getAgentProxy( AgentPath path )
- throws ObjectNotFound
+ throws ObjectNotFoundException
{
return (AgentProxy) getProxy(path);
}
diff --git a/src/main/java/com/c2kernel/entity/proxy/ProxyMessage.java b/src/main/java/com/c2kernel/entity/proxy/ProxyMessage.java
index fc69992..354ec32 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ProxyMessage.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ProxyMessage.java
@@ -23,7 +23,7 @@ package com.c2kernel.entity.proxy;
import java.io.IOException;
import java.net.DatagramPacket;
-import com.c2kernel.common.InvalidData;
+import com.c2kernel.common.InvalidDataException;
import com.c2kernel.lookup.InvalidItemPathException;
import com.c2kernel.lookup.ItemPath;
@@ -65,17 +65,17 @@ public class ProxyMessage {
setState(state);
}
- public ProxyMessage(String line) throws InvalidData, IOException {
+ public ProxyMessage(String line) throws InvalidDataException, IOException {
if (line == null)
throw new IOException("Null proxy message");
String[] tok = line.split(":");
if (tok.length != 2)
- throw new InvalidData("String '"+line+"' does not constitute a valid proxy message.");
+ throw new InvalidDataException("String '"+line+"' does not constitute a valid proxy message.");
if (tok[0].length() > 0 && !tok[0].equals("tree")) {
try {
itemPath = new ItemPath(tok[0]);
} catch (InvalidItemPathException e) {
- throw new InvalidData("Item in proxy message "+line+" was not valid");
+ throw new InvalidDataException("Item in proxy message "+line+" was not valid");
}
}
path = tok[1];
@@ -85,7 +85,7 @@ public class ProxyMessage {
}
}
- public ProxyMessage(DatagramPacket packet) throws InvalidData, IOException {
+ public ProxyMessage(DatagramPacket packet) throws InvalidDataException, IOException {
this(new String(packet.getData()));
}
diff --git a/src/main/java/com/c2kernel/entity/proxy/ProxyServerConnection.java b/src/main/java/com/c2kernel/entity/proxy/ProxyServerConnection.java
index edcbd44..25a7216 100644
--- a/src/main/java/com/c2kernel/entity/proxy/ProxyServerConnection.java
+++ b/src/main/java/com/c2kernel/entity/proxy/ProxyServerConnection.java
@@ -27,7 +27,7 @@ import java.io.InterruptedIOException;
import java.io.PrintWriter;
import java.net.Socket;
-import com.c2kernel.common.InvalidData;
+import com.c2kernel.common.InvalidDataException;
import com.c2kernel.utils.Logger;
@@ -76,7 +76,7 @@ public class ProxyServerConnection extends Thread
manager.processMessage(thisMessage);
} catch (InterruptedIOException ex) { // timeout - send a ping
sendMessage(ProxyMessage.pingMessage);
- } catch (InvalidData ex) { // invalid proxy message
+ } catch (InvalidDataException ex) { // invalid proxy message
if (input != null)
Logger.error("EntityProxyManager - Invalid proxy message: "+input);
}