iglu.examples
Class ProxyServerExample.myURLHandler

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--iglu.net.ClientHandler
              |
              +--iglu.net.WebHandler
                    |
                    +--iglu.examples.ProxyServerExample.myURLHandler
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ProxyServerExample

public static class ProxyServerExample.myURLHandler
extends WebHandler


Field Summary
 
Fields inherited from class iglu.net.WebHandler
ATTEMPTS, BUFFSIZE, clientCommands, Command, defaultSize, doc, host, HTML, port, rawServerContent, requestedURL, serverContent, serverHeader, serverReply, UNKNOWN, WAIT, webServer, wsin, wsout
 
Fields inherited from class iglu.net.ClientHandler
clientSocket, in, myServer, out
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProxyServerExample.myURLHandler(java.net.Socket client, PortServer ms)
          This is the critical part to getting the proxy server going.
 
Method Summary
 void doneWithNetworkAccess()
          This is where all the action takes place.
 
Methods inherited from class iglu.net.WebHandler
figureOutDestination, grow, internalDoneWithNetworkAccess, lookupValue, performCom, processClient, requestType
 
Methods inherited from class iglu.net.ClientHandler
init, run
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxyServerExample.myURLHandler

public ProxyServerExample.myURLHandler(java.net.Socket client,
                                       PortServer ms)
                                throws java.io.IOException
This is the critical part to getting the proxy server going. You must create a handler to tell the system what to do with each url accessed.

Parameters:
client - The socket reuesting a resource, i.e. the socket opened by the browser.
ms - The server.
Throws:
java.io.IOException
Method Detail

doneWithNetworkAccess

public void doneWithNetworkAccess()
This is where all the action takes place. Here is where you want to write you log file, store information, etc.

Overrides:
doneWithNetworkAccess in class ClientHandler