FileDocCategorySizeDatePackage
Echo.javaAPI DocphoneME MR2 API (J2ME)1750Wed May 02 18:00:02 BST 2007com.sun.midp.links

Echo

public class Echo extends Object
A main class for running in another isolate. Expects an array of two links. Continually receives messages on the first link and sends them to the second.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        Link[] la;

        la = LinkPortal.getLinks();

        if (la == null) {
            throw new IOException("getLinks() returned null");
        }

        if (la.length != 2) {
            throw new IOException("getLinks() returned wrong length array");
        }

        while (true) {
            LinkMessage lm = la[0].receive();
            la[1].send(lm);
        }