EventDispatcher
I2PTunnelHTTPBidirServer
public class I2PTunnelHTTPServer extends I2PTunnelServer
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
DEFAULT_POST_BAN_TIME |
|
static int |
DEFAULT_POST_MAX |
|
static int |
DEFAULT_POST_TOTAL_BAN_TIME |
|
static int |
DEFAULT_POST_TOTAL_MAX |
|
static int |
DEFAULT_POST_WINDOW |
|
protected static java.lang.String |
ERR_REQUEST_TIMEOUT |
|
static java.lang.String |
OPT_POST_BAN_TIME |
|
static java.lang.String |
OPT_POST_MAX |
|
static java.lang.String |
OPT_POST_TOTAL_BAN_TIME |
|
static java.lang.String |
OPT_POST_TOTAL_MAX |
|
static java.lang.String |
OPT_POST_WINDOW |
all of these in SECONDS
|
static java.lang.String |
OPT_REJECT_INPROXY |
|
static java.lang.String |
OPT_REJECT_REFERER |
|
static java.lang.String |
OPT_REJECT_USER_AGENTS |
|
static java.lang.String |
OPT_USER_AGENTS |
__serverId, _clientExecutor, _log, bidir, i2pss, l, localPort, PROP_ALT_PKF, PROP_UNIQUE_LOCAL, PROP_USE_SSL, readTimeout, remoteHost, remotePort, slock, sockMgr, sslLock, task
open
コンストラクタ | 説明 |
---|---|
I2PTunnelHTTPServer(java.net.InetAddress host,
int port,
java.io.File privkey,
java.lang.String privkeyname,
java.lang.String spoofHost,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
|
I2PTunnelHTTPServer(java.net.InetAddress host,
int port,
java.io.InputStream privData,
java.lang.String privkeyname,
java.lang.String spoofHost,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
|
I2PTunnelHTTPServer(java.net.InetAddress host,
int port,
java.lang.String privData,
java.lang.String spoofHost,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
protected void |
blockingHandle(I2PSocket socket) |
Called by the thread pool of I2PSocket handlers
|
boolean |
close(boolean forced) |
Note that the tunnel can be reopened after this by calling startRunning().
|
protected static java.lang.String |
formatHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers,
java.lang.StringBuilder command) |
|
void |
optionsUpdated(I2PTunnel tunnel) |
Update the I2PSocketManager.
|
(package private) static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
readHeaders(I2PSocket socket,
java.io.InputStream in,
java.lang.StringBuilder command,
java.lang.String[] skipHeaders,
I2PAppContext ctx) |
From I2P to server: socket non-null, in null.
|
void |
startRunning() |
Start running the I2PTunnelServer.
|
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue
destroy, getHandlerCount, getReadTimeout, getSocket, getSocket, run, setReadTimeout, shouldUsePool
connected, disconnected, errorOccurred, getId, getTunnel, isOpen, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString
public static final java.lang.String OPT_POST_WINDOW
public static final java.lang.String OPT_POST_BAN_TIME
public static final java.lang.String OPT_POST_TOTAL_BAN_TIME
public static final java.lang.String OPT_POST_MAX
public static final java.lang.String OPT_POST_TOTAL_MAX
public static final java.lang.String OPT_REJECT_INPROXY
public static final java.lang.String OPT_REJECT_REFERER
public static final java.lang.String OPT_REJECT_USER_AGENTS
public static final java.lang.String OPT_USER_AGENTS
public static final int DEFAULT_POST_WINDOW
public static final int DEFAULT_POST_BAN_TIME
public static final int DEFAULT_POST_TOTAL_BAN_TIME
public static final int DEFAULT_POST_MAX
public static final int DEFAULT_POST_TOTAL_MAX
protected static final java.lang.String ERR_REQUEST_TIMEOUT
public I2PTunnelHTTPServer(java.net.InetAddress host, int port, java.lang.String privData, java.lang.String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
public I2PTunnelHTTPServer(java.net.InetAddress host, int port, java.io.File privkey, java.lang.String privkeyname, java.lang.String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
public I2PTunnelHTTPServer(java.net.InetAddress host, int port, java.io.InputStream privData, java.lang.String privkeyname, java.lang.String spoofHost, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
public void startRunning()
I2PTunnelServer
startRunning
クラス内 I2PTunnelServer
public boolean close(boolean forced)
I2PTunnelServer
close
クラス内 I2PTunnelServer
public void optionsUpdated(I2PTunnel tunnel)
I2PTunnelServer
optionsUpdated
クラス内 I2PTunnelServer
protected void blockingHandle(I2PSocket socket)
blockingHandle
クラス内 I2PTunnelServer
protected static java.lang.String formatHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers, java.lang.StringBuilder command)
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> readHeaders(I2PSocket socket, java.io.InputStream in, java.lang.StringBuilder command, java.lang.String[] skipHeaders, I2PAppContext ctx) throws java.io.IOException
socket
- if null, use in as InputStreamin
- if null, use socket.getInputStream() as InputStreamcommand
- out parameter, first lineskipHeaders
- MUST be lower casejava.net.SocketTimeoutException
- if timeout is reached before newlinejava.io.EOFException
- if EOF is reached before newlinenet.i2p.i2ptunnel.I2PTunnelHTTPServer.LineTooLongException
- if one header too long, or too many headers, or total size too bignet.i2p.i2ptunnel.I2PTunnelHTTPServer.RequestTooLongException
- if too longnet.i2p.i2ptunnel.I2PTunnelHTTPServer.BadRequestException
- on bad headersjava.io.IOException
- on other errors in the underlying stream