Purple Code

com.purpletech.net
Class Proxy

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.purpletech.net.Proxy
All Implemented Interfaces:
java.lang.Runnable

public class Proxy
extends java.lang.Thread

A simple threaded proxy server. Routes data between two hosts transparently. Usage:

        java com.purpletech.net.Proxy host [port [localport]]
    
Defaults:
        port=80
        localport=80
    

Version:
1.0 Oct 1997
Author:
Alex Chaffee (alex@stinky.com)

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Proxy(java.lang.String[] args)
           
Proxy(java.lang.String host, int port)
           
Proxy(java.lang.String host, int portRemote, int portLocal)
           
 
Method Summary
 void close()
           
 java.lang.String getClientString(int i)
           
 java.lang.String getServerString(int i)
           
 boolean isFinished(int i)
           
static void main(java.lang.String[] args)
           
static java.net.ServerSocket newServerSocket(int port)
           
 void run()
           
 void waitFor(int i)
           
 
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

Proxy

public Proxy(java.lang.String[] args)

Proxy

public Proxy(java.lang.String host,
             int portRemote,
             int portLocal)
      throws java.io.IOException

Proxy

public Proxy(java.lang.String host,
             int port)
      throws java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
java.io.IOException

isFinished

public boolean isFinished(int i)

waitFor

public void waitFor(int i)

getClientString

public java.lang.String getClientString(int i)

getServerString

public java.lang.String getServerString(int i)

newServerSocket

public static java.net.ServerSocket newServerSocket(int port)
                                             throws java.io.IOException
java.io.IOException

close

public void close()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

Documentation generated March 5 2003