PPT Slide
class PoolThread extends Thread {
private static String webProxy = "http://webproxy.bell-labs.com";
private static int proxyPort = 8888;
private static Hashtable documentCache;
private static String id = "Connection Handler Thread";
private byte[] buffer = new byte[2048];
private ByteArrayOutputStream webDoc = new ByteArrayOutputStream(8000);
private Hashtable documentLinks = new Hashtable(50, .8f);
private static ServerSocket server;
public PoolThread(Hashtable cache, ServerSocket thisHost) {
// wait for connection request (wait state)
webServer = server.accept();
... // read in document and prefetch links here