Skip to Content.
Sympa Menu

perfsonar-dev - r2101 - branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType

Subject: perfsonar development work

List archive

r2101 - branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType


Chronological Thread 
  • From:
  • To:
  • Subject: r2101 - branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType
  • Date: Wed, 21 Feb 2007 06:36:18 -0500

Author: mac
Date: 2007-02-21 06:36:17 -0500 (Wed, 21 Feb 2007)
New Revision: 2101

Modified:

branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
Log:
Checking eventType. Supported one is : echo.ls

Modified:
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
===================================================================
---
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
2007-02-21 11:29:04 UTC (rev 2100)
+++
branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType/EchoRequestAction.java
2007-02-21 11:36:17 UTC (rev 2101)
@@ -17,6 +17,8 @@
*
*/
public class EchoRequestAction extends LSAction {
+
+ public final static String SUPPORTED_EVENT_TYPE="echo.ls";

public EchoRequestAction(StorageManager xmlStorageManager) throws
SystemException {
super(xmlStorageManager);
@@ -28,6 +30,23 @@

//get metadata to exctract parameters
Metadata metadata = getMetadataFromRequest(request);
+
+ try {
+ //check eventtype
+ String eventType = metadata.getEventType().getEventType();
+ if (!(eventType.equals(SUPPORTED_EVENT_TYPE)))
+ throw new SystemException("error.ls.eventtype_not_supported",
+ "LS EchoRequest error: " +
+ "Not supported event type ["+eventType+"]. " +
+ "Must be: ["+SUPPORTED_EVENT_TYPE+"]");
+
+ } catch (RuntimeException ex) {
+ throw new SystemException("error.ls.no_eventtype",
+ "LS EchoRequest error: " +
+ "Error while determining eventType (possibly no
eventType at all). " +
+ "EventType must be ["+SUPPORTED_EVENT_TYPE+"]. " +
+ "Nested exception is : "+ex.getMessage());
+ }

String message = ""; //additional message

@@ -44,7 +63,7 @@
} catch (PerfSONARException ex) {
throw new SystemException(
ex.getResultCode(),
- "EchoRequest (Test DB Connection) error: " +
+ "LS EchoRequest (Test DB Connection) error: " +
"Database connection to the LookupService is not
established. " +
"Nested exception is : "+ex.getResultDescription());
}
@@ -66,7 +85,7 @@
} catch (PerfSONARException ex) {
throw new SystemException(
ex.getResultCode(),
- "EchoRequest (Test DB Schema) error: " +
+ "LS EchoRequest (Test DB Schema) error: " +
"Database connection to the LookupService is not
established or" +
" storage is not set properly. " +
"Nested exception is : "+ex.getResultDescription());
@@ -139,7 +158,7 @@
PerfSONARException pex =
new PerfSONARException(
"success.echo",
- "This is the successful echo response from the Lookup
Service."+
+ "LS EchoRequest - This is the successful echo response
from the Lookup Service."+
((!("".equals(message)))?
" Additional message is:\n"+message
:



  • r2101 - branches/XML-LS-RELEASE-1.1/src/org/perfsonar/service/lookupService/xmlType, svnlog, 02/21/2007

Archive powered by MHonArc 2.6.16.

Top of Page