DemoAgent1.java

This is a snippet of the java code for the demonstration class, DemoAgent1.java. The full code is in the directory: <Tymeac base>\Source.

package com.tymeac.serveruser;
public class DemoAgent1 {

public static void main(Object[] args)
        throws java.lang.Throwable {

try {

// number of objects passed
int nbr = 0;

// the passed object array
Object[] what = null;

// arg is really an object[]
what = (Object[]) args[0];

// length of array
nbr = what.length;

// When none, bye
if (nbr < 1) {

    // all done here
    return;

} // endif

// base data
String out = "DemoAgent1 ==>";

// concat all the passed strings
for (int i = 0; i < nbr; i++) {

    // each string
    out = out.concat((String) what[i]);

} // end-for

// put out
System.out.println(out);

} // end-try

catch (java.lang.Throwable e) {

//e.printStackTrace(System.out);

throw e;
} // end-catch

       } // end-method
} // end-class

 

 

© 1998 - 2004 Cooperative Software Systems, Inc.  All rights reserved.