java.lang.Runnable
public class HTTPServer
extends java.lang.Object
implements java.lang.Runnable
open(InetAddress, int)
or the open(String, int)
method.HTTPRequestListener
may be setstart()
and stop()
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
DEFAULT_PORT |
|
static int |
DEFAULT_TIMEOUT |
Default timeout connection for HTTP comunication
|
static java.lang.String |
NAME |
|
protected int |
timeout |
Store the current TCP timeout value
The variable should be accessed by getter and setter metho
|
static java.lang.String |
VERSION |
コンストラクタ | 説明 |
---|---|
HTTPServer() |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
java.net.Socket |
accept() |
|
void |
addRequestListener(HTTPRequestListener listener) |
|
boolean |
close() |
|
java.lang.String |
getBindAddress() |
|
int |
getBindPort() |
|
static java.lang.String |
getName() |
|
java.net.ServerSocket |
getServerSock() |
|
int |
getTimeout() |
Get the current socket timeout
|
boolean |
isOpened() |
|
boolean |
open(java.lang.String addr,
int port) |
|
boolean |
open(java.net.InetAddress addr,
int port) |
|
void |
performRequestListener(HTTPRequest httpReq) |
|
void |
removeRequestListener(HTTPRequestListener listener) |
|
void |
run() |
|
void |
setTimeout(int timeout) |
Set the current socket timeout
|
boolean |
start() |
|
boolean |
stop() |
public static final java.lang.String NAME
public static final java.lang.String VERSION
public static final int DEFAULT_PORT
public static final int DEFAULT_TIMEOUT
protected int timeout
public static java.lang.String getName()
public java.net.ServerSocket getServerSock()
public java.lang.String getBindAddress()
public int getBindPort()
public int getTimeout()
public void setTimeout(int timeout)
timeout
- public boolean open(java.net.InetAddress addr, int port)
public boolean open(java.lang.String addr, int port)
public boolean close()
public java.net.Socket accept()
public boolean isOpened()
public void addRequestListener(HTTPRequestListener listener)
public void removeRequestListener(HTTPRequestListener listener)
public void performRequestListener(HTTPRequest httpReq)
public void run()
run
インタフェース内 java.lang.Runnable
public boolean start()
public boolean stop()