Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Freenet.contrib.fproxy
Class HttpHandler  view HttpHandler download HttpHandler.java

java.lang.Object
  extended byjava.lang.Thread
      extended byFreenet.contrib.fproxy.HttpHandler
All Implemented Interfaces:
java.lang.Runnable

public class HttpHandler
extends java.lang.Thread

Thread to handle incoming HTTP connections for the ProxyServer


Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  long id
           
private static long ids
           
private  java.io.InputStream in
           
protected static char[] lf
           
private  java.io.OutputStream out
           
private  ProxyServer ps
           
private  java.net.Socket s
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HttpHandler(java.net.Socket s, ProxyServer ps)
          Creates a new HttpHandler communicating on Socket s for ProxyServer ps
 
Method Summary
protected  java.lang.String readTo(java.io.PushbackInputStream i, char[] tms)
          Utility function to return String from InputStream until one of the characters in tms is about to be read.
 void run()
          Main routine to process an HTTP request
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Field Detail

lf

protected static final char[] lf

ps

private ProxyServer ps

s

private java.net.Socket s

in

private java.io.InputStream in

out

private java.io.OutputStream out

ids

private static long ids

id

private long id
Constructor Detail

HttpHandler

public HttpHandler(java.net.Socket s,
                   ProxyServer ps)
            throws java.io.IOException
Creates a new HttpHandler communicating on Socket s for ProxyServer ps

Method Detail

run

public void run()
Main routine to process an HTTP request


readTo

protected java.lang.String readTo(java.io.PushbackInputStream i,
                                  char[] tms)
                           throws java.io.IOException,
                                  java.io.EOFException
Utility function to return String from InputStream until one of the characters in tms is about to be read.