notional testing of client and user app data read and writing
authorjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 28 Aug 2007 15:15:34 +0000 (15:15 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Tue, 28 Aug 2007 15:15:34 +0000 (15:15 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@447 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/test/ExampleApplication.java

index 826a8eb..e7557df 100644 (file)
@@ -144,11 +144,18 @@ public class ExampleApplication {
         System.out.println("Client appdata\n" + cappds + "\nEnd of Appdata\n");
       } else {
         if (!writtenonce) {
+          String newapd = "Client Appdata:";
+          if (appd.hasClientAppdata())
+          {
+            AppDataInputStream is;
+            newapd = readData(is = appd.getClientInputStream());
+            is.close();
+          }
           writtenonce = true;
           // appd.setClientAppdata(makeappData("Client Appdata for
           // "+user.toString()+" written"));
           writeData(appd.getClientOutputStream(),
-              "Client Appdata for all users written on " + appdatareads
+              newapd+" : Client Appdata for all users written on " + appdatareads
                   + " read by " + vorbaclient.getUserHandle());
           System.out.println("Written to ClientAppdata stream.");
         }
@@ -567,6 +574,7 @@ public class ExampleApplication {
     vorbaclient=null;
     clientfactory=null;
     System.out.println("Byee!");
+    //try { Thread.sleep(100000); } catch (Exception e) {}
   }
 
   public static void main(String[] args) {