Order the Book

Class QueryCollection


public class QueryCollection
extends Object
implements Runnable

When this class is built, it returns a value immediately, but this value returns false for isDone and null for getQueries. Meanwhile, it starts a Thread to request an array of query strings from the server, reading them in one fell swoop by means of an ObjectInputStream. Once they've all arrived, they are placed in the location getQueries returns, and the isDone flag is switched to true. Used by the ShowQueries applet.

Taken from Core Servlets and JavaServer Pages from Prentice Hall and Sun Microsystems Press, http://www.coreservlets.com/. © 2000 Marty Hall; may be freely used or adapted.

Constructor Summary
QueryCollection(String urlSuffix, URL currentPage)
Method Summary
 String[] getQueries()
 boolean isDone()
 void run()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public QueryCollection(String urlSuffix,
                       URL currentPage)
Method Detail


public void run()
Specified by:
run in interface Runnable


public String[] getQueries()


public boolean isDone()

Order the Book

CSAJSP @ amazon.com

Return to Top-Level Source Code Archive