org.cybergarage.http
Class HTTPServer

java.lang.Object
  extended by org.cybergarage.http.HTTPServer
All Implemented Interfaces:
Runnable

public class HTTPServer
extends Object
implements Runnable


Field Summary
static int DEFAULT_PORT
           
static String NAME
           
static String VERSION
           
 
Constructor Summary
HTTPServer()
           
 
Method Summary
 Socket accept()
           
 void addRequestListener(HTTPRequestListener listener)
           
 boolean close()
           
 String getBindAddress()
           
 int getBindPort()
           
static String getName()
           
 ServerSocket getServerSock()
           
 boolean isOpened()
           
 boolean open(String addr, int port)
           
 void performRequestListener(HTTPRequest httpReq)
           
 void removeRequestListener(HTTPRequestListener listener)
           
 void run()
           
 boolean start()
           
 boolean stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

VERSION

public static final String VERSION
See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values
Constructor Detail

HTTPServer

public HTTPServer()
Method Detail

getName

public static String getName()

getServerSock

public ServerSocket getServerSock()

getBindAddress

public String getBindAddress()

getBindPort

public int getBindPort()

open

public boolean open(String addr,
                    int port)

close

public boolean close()

accept

public Socket accept()

isOpened

public boolean isOpened()

addRequestListener

public void addRequestListener(HTTPRequestListener listener)

removeRequestListener

public void removeRequestListener(HTTPRequestListener listener)

performRequestListener

public void performRequestListener(HTTPRequest httpReq)

run

public void run()
Specified by:
run in interface Runnable

start

public boolean start()

stop

public boolean stop()