Skip to Content.
Sympa Menu

perfsonar-dev - r1887 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType

Subject: perfsonar development work

List archive

r1887 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType


Chronological Thread 
  • From:
  • To:
  • Subject: r1887 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType
  • Date: Mon, 8 Jan 2007 05:20:33 -0500

Author: mac
Date: 2007-01-08 05:20:31 -0500 (Mon, 08 Jan 2007)
New Revision: 1887

Modified:

trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
Log:
EchoRequest support for LS: support in LS Service Engine

Modified:
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
===================================================================
---
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
2007-01-08 10:19:45 UTC (rev 1886)
+++
trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType/XmlTypeLSServiceEngine.java
2007-01-08 10:20:31 UTC (rev 1887)
@@ -12,12 +12,14 @@
import org.perfsonar.service.commons.engine.ActionType;
import org.perfsonar.service.commons.engine.ServiceEngine;
import org.perfsonar.service.commons.exceptions.DataFormatException;
+import org.perfsonar.service.commons.exceptions.PerfSONARException;
import org.perfsonar.service.commons.exceptions.RequestException;
import org.perfsonar.service.commons.exceptions.SystemException;
import org.perfsonar.service.commons.storage.xmldb.XmlDbDataRepository;
import org.perfsonar.service.commons.storage.xmldb.XmlDbStorageManager;
import org.perfsonar.service.commons.storage.xmldb.exist.ExistDbFactory;
import org.perfsonar.service.commons.storage.xmldb.XmlDbConstants;
+import org.perfsonar.service.commons.util.ResultCodesUtil;

/**
* ServiceEngine class for LookupService. (The heart of the LookupService)
@@ -94,7 +96,8 @@
ActionType.LS_REGISTER,
ActionType.LS_LOOKUP,
ActionType.LS_DEREGISTER,
- ActionType.LS_KEEPALIVE
+ ActionType.LS_KEEPALIVE,
+ ActionType.ECHO
};

smType = config.getProperty("service.ls.db_type");
@@ -202,7 +205,11 @@
getStorageManager(smType);
LSAction action = new LSKeepaliveAction(xmlDbStorageManager);
response = action.performAction(request);
-
+
+ } else if (actionType.equals(ActionType.ECHO)) {
+
+ response = getEcho(request);
+
} else {

throw new SystemException("error.ls.action_not_suported",
@@ -247,5 +254,22 @@

}

+ protected Message getEcho(Message request)
+ throws SystemException, RequestException, DataFormatException {
+
+ Message response = new Message();

+ PerfSONARException pex =
+ new PerfSONARException(
+ "success.echo",
+ "This is the echo response from the Lookup Service");
+
+ ResultCodesUtil.createResultCodeMetadata(response, pex);
+
+ return response;
+
+ }
+
+
+
} //XmlTypeLSServiceEngine



  • r1887 - trunk/perfsonar/src/org/perfsonar/service/lookupService/xmlType, svnlog, 01/08/2007

Archive powered by MHonArc 2.6.16.

Top of Page