perfsonar-dev - perfsonar: r4108 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/messages measurementArchive/metadataConfig/queryGenerator
Subject: perfsonar development work
List archive
perfsonar: r4108 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/messages measurementArchive/metadataConfig/queryGenerator
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4108 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/messages measurementArchive/metadataConfig/queryGenerator
- Date: Thu, 3 Jul 2008 07:20:15 -0400
Author: roman
Date: 2008-07-03 07:20:15 -0400 (Thu, 03 Jul 2008)
New Revision: 4108
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/XmlDbAccessTestQueryGenerator.java
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/XmlDbContentTestQueryGenerator.java
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
Log:
See revision number 4105.
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
2008-07-03 11:17:35 UTC (rev 4107)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/messages/EchoRequest.java
2008-07-03 11:20:15 UTC (rev 4108)
@@ -44,7 +44,6 @@
super();
logger.debug("EchoRequest: MessageHandler created");
setType(ActionType.ECHO);
-
}
@@ -54,34 +53,26 @@
public Map<String,Metadata> mergeAllMetadata(Map<String,Metadata>
metadatas) {
-
- return metadatas;
+ return metadatas;
}
public Message execute(Message reqMessage) {
ArrayList<Message> output = new ArrayList<Message>();
-
for (Message inputMessage: extractMultipleRequests(reqMessage)) {
-
try {
-
output.add(
executeEcho(inputMessage));
-
} catch (PerfSONARException e) {
-
output.add(
ResultCodesUtil.createResultCodeMetadata(
null, e));
-
- }
-
+ }
}
- //do one message from all result messages
+ //do one message from all result messages
Message respMessage = mergeMultipleResponses(output);
//if no metadata inside, print error
@@ -107,66 +98,66 @@
protected Message executeEcho(Message request)
- throws PerfSONARException {
+ throws PerfSONARException {
- Data data = request.getDataArray()[0];
- Metadata metadata = request.getMetadata(data.getMetadataIdRef());
+ Data data = request.getDataArray()[0];
+ Metadata metadata = request.getMetadata(data.getMetadataIdRef());
- EventType eventType = metadata.getEventType();
- if (eventType == null) {
- logger.debug("EchoRequest.executeEcho: The request does not
contain "
- + "eventType element");
- throw new PerfSONARException(
- "error.request",
- "EchoRequest.executeEcho: The request does
not contain "
- + "eventType element");
- }
+ EventType eventType = metadata.getEventType();
+ if (eventType == null) {
+ logger.debug("EchoRequest.executeEcho: The request does not
contain "
+ + "eventType element");
+ throw new PerfSONARException(
+ "error.request",
+ "EchoRequest.executeEcho: The request does not contain "
+ + "eventType element");
+ }
- Message response = null;
-
- if (eventType.getEventType().trim().equals(ECHO_NAMESPACE)) {
- response = executeSimpleEcho();
- } else if (eventType.getEventType().trim().equals("")) {
- response = getEmptyEventTypeResponse();
- } else {
- response = serviceEngine.takeAction(getType(), request);
- }
+ Message response = null;
- return response;
+ if (eventType.getEventType().trim().equals(ECHO_NAMESPACE)) {
+ response = executeSimpleEcho();
+ } else if (eventType.getEventType().trim().equals("")) {
+ response = getEmptyEventTypeResponse();
+ } else {
+ response = serviceEngine.takeAction(getType(), request);
+ }
+ return response;
+
}
protected Message executeSimpleEcho() {
- logger.debug("EchoRequest: executeSimpleEcho()");
+ logger.debug("EchoRequest: executeSimpleEcho()");
- Message response = new Message();
+ Message response = new Message();
- PerfSONARException pex =
- new PerfSONARException(
- "success.echo",
- "This is the echo response from the
service.");
+ PerfSONARException pex =
+ new PerfSONARException(
+ "success.echo",
+ "This is the echo response from the service.");
- ResultCodesUtil.createResultCodeMetadata(response, pex);
+ ResultCodesUtil.createResultCodeMetadata(response, pex);
- return response;
+ return response;
}
protected Message getEmptyEventTypeResponse() {
- Message response = new Message();
+ Message response = new Message();
- PerfSONARException pex =
- new PerfSONARException(
- "error.echo",
- "EventType is empty.");
+ PerfSONARException pex =
+ new PerfSONARException(
+ "error.echo",
+ "EventType is empty.");
- ResultCodesUtil.createResultCodeMetadata(response, pex);
+ ResultCodesUtil.createResultCodeMetadata(response, pex);
- return response;
+ return response;
}
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/XmlDbAccessTestQueryGenerator.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/XmlDbAccessTestQueryGenerator.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/XmlDbContentTestQueryGenerator.java
Property changes on:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/measurementArchive/metadataConfig/queryGenerator/XmlDbContentTestQueryGenerator.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
- perfsonar: r4108 - in trunk/perfsonar_base/src/main/java/org/perfsonar/service: base/messages measurementArchive/metadataConfig/queryGenerator, svnlog, 07/03/2008
Archive powered by MHonArc 2.6.16.