Order the Book

Class QueryCollection

java.lang.Object
  |
  +--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

QueryCollection

public QueryCollection(String urlSuffix,
                       URL currentPage)
Method Detail

run

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

getQueries

public String[] getQueries()

isDone

public boolean isDone()

Order the Book

Order
CSAJSP @ amazon.com

Return to Top-Level Source Code Archive