[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Sat Jun 16 00:26:01 UTC 2007
gordonp
Fri Jun 15 20:26:01 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv29141/src/main/org/biomoby/client
Modified Files:
MobyRequest.java
Log Message:
Eliminated superfluous processEvent() call, once all data is loaded
moby-live/Java/src/main/org/biomoby/client MobyRequest.java,1.26,1.27
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java 2007/06/08 14:04:27 1.26
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java 2007/06/16 00:26:01 1.27
@@ -293,7 +293,11 @@
Element mobyDOM = null;
if(mobyService.isAsynchronous()){
// Async is "simpler", because it had to merge DOMs together into a single MobyContentInstance anyway
- return performAsyncSOAPRequest(mobyService, inData, handler, requestId);
+ MobyContentInstance mci = performAsyncSOAPRequest(mobyService, inData, handler, requestId);
+ StringWriter writer = new StringWriter();
+ MobyDataUtils.toXMLDocument(writer, mci);
+ contentsXML.append(writer.toString());
+ return mci;
}
else{
String mobyXML = convertMOBYDataToMOBYRequest(inData);
@@ -347,7 +351,12 @@
MobyDataUtils.toXMLDocument(xmlWriter, finalContents);
mre.setContentsXML(xmlWriter.toString());
- handler.processEvent(mre);
+ if(!queryIDs.isEmpty()){
+ // Send an update event only if we aren't finished yet.
+ // If we are finished, the client is going to get this event as the
+ // invocation thread finishes up (no need to double up).
+ handler.processEvent(mre);
+ }
}
}
} catch (Exception e) {
More information about the MOBY-guts
mailing list