iglu.examples
Class ProxyServerExample

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--iglu.net.PortServerThread
              |
              +--iglu.net.URLServerThread
                    |
                    +--iglu.examples.ProxyServerExample
All Implemented Interfaces:
java.lang.Runnable

public class ProxyServerExample
extends URLServerThread

Implements a simple proxy server. It simply prints out all the URL's access to stdout. Start the program, then point your browser to the proxy server at port 9000, and surf away! It will print out the url of all resourcess accessed.


Nested Class Summary
static class ProxyServerExample.myURLHandler
           
 
Field Summary
 
Fields inherited from class iglu.net.URLServerThread
blackList
 
Fields inherited from class iglu.net.PortServerThread
psvr
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProxyServerExample(java.net.InetAddress addr, java.lang.Integer port, ClientCreator ncc)
          Get the server ready to run.
 
Method Summary
static void main(java.lang.String[] argv)
          Gets the program running.
 
Methods inherited from class iglu.net.URLServerThread
getBlackList, setBlackList
 
Methods inherited from class iglu.net.PortServerThread
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

public ProxyServerExample(java.net.InetAddress addr,
                          java.lang.Integer port,
                          ClientCreator ncc)
Get the server ready to run.

Parameters:
addr - The address of the machine where the server will run.
port - The port to listen to.
ncc - The ClientCreator to use.
See Also:
PortServer
Method Detail

main

public static void main(java.lang.String[] argv)
Gets the program running.

Parameters:
argv -