|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.util.EventDispatcherImpl
net.i2p.i2ptunnel.I2PTunnelTask
net.i2p.i2ptunnel.I2PTunnelServer
public class I2PTunnelServer
Field Summary | |
---|---|
protected static long |
__serverId
|
protected Log |
_log
|
protected boolean |
bidir
|
protected I2PServerSocket |
i2pss
|
protected Logging |
l
|
protected int |
localPort
|
protected long |
readTimeout
default timeout to 5 minutes - override if desired |
protected InetAddress |
remoteHost
|
protected int |
remotePort
|
protected Object |
slock
|
protected I2PSocketManager |
sockMgr
|
protected I2PTunnelTask |
task
|
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelTask |
---|
open |
Constructor Summary | |
---|---|
I2PTunnelServer(InetAddress host,
int port,
File privkey,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Warning, blocks in constructor while connecting to router and building tunnels; TODO move that to startRunning() |
|
I2PTunnelServer(InetAddress host,
int port,
I2PSocketManager sktMgr,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Non-blocking |
|
I2PTunnelServer(InetAddress host,
int port,
InputStream privData,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Warning, blocks in constructor while connecting to router and building tunnels; TODO move that to startRunning() |
|
I2PTunnelServer(InetAddress host,
int port,
String privData,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
Warning, blocks in constructor while connecting to router and building tunnels; TODO move that to startRunning() |
Method Summary | |
---|---|
protected void |
blockingHandle(I2PSocket socket)
|
boolean |
close(boolean forced)
|
protected int |
getHandlerCount()
|
long |
getReadTimeout()
Get the read idle timeout for newly-created connections (in milliseconds). |
void |
optionsUpdated(I2PTunnel tunnel)
Update the I2PSocketManager. |
void |
run()
If usePool is set, this starts the executor pool. |
void |
setReadTimeout(long ms)
Set the read idle timeout for newly-created connections (in milliseconds). |
boolean |
shouldUsePool()
|
void |
startRunning()
Start running the I2PTunnelServer. |
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelTask |
---|
connected, disconnected, errorOccurred, getId, getTunnel, isOpen, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString |
Methods inherited from class net.i2p.util.EventDispatcherImpl |
---|
attachEventDispatcher, detachEventDispatcher, getEventDispatcher, getEvents, getEventValue, ignoreEvents, notifyEvent, unIgnoreEvents, waitEventValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Log _log
protected I2PSocketManager sockMgr
protected I2PServerSocket i2pss
protected final Object slock
protected InetAddress remoteHost
protected int remotePort
protected Logging l
protected long readTimeout
protected static volatile long __serverId
protected I2PTunnelTask task
protected boolean bidir
protected int localPort
Constructor Detail |
---|
public I2PTunnelServer(InetAddress host, int port, String privData, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
privData
- Base64-encoded private key data,
format is specified in PrivateKeyFile
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic I2PTunnelServer(InetAddress host, int port, File privkey, String privkeyname, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
privkey
- file containing the private key data,
format is specified in PrivateKeyFile
privkeyname
- the name of the privKey file, not clear why we need this too
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic I2PTunnelServer(InetAddress host, int port, InputStream privData, String privkeyname, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
privData
- stream containing the private key data,
format is specified in PrivateKeyFile
privkeyname
- the name of the privKey file, not clear why we need this too
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic I2PTunnelServer(InetAddress host, int port, I2PSocketManager sktMgr, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
sktMgr
- the existing socket managerMethod Detail |
---|
public void startRunning()
public void setReadTimeout(long ms)
public long getReadTimeout()
public boolean close(boolean forced)
close
in class I2PTunnelTask
public void optionsUpdated(I2PTunnel tunnel)
optionsUpdated
in class I2PTunnelTask
protected int getHandlerCount()
public void run()
run
in interface Runnable
public boolean shouldUsePool()
protected void blockingHandle(I2PSocket socket)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |