public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErrorListener
Modifier and Type | Class and Description |
---|---|
static interface |
I2PTunnelRunner.FailCallback
For use in new constructor
|
I2PThread.OOMEventListener
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected Log |
_log |
(package private) static int |
MAX_PACKET_SIZE
max bytes streamed in a packet - smaller ones might be filled
up to this size.
|
(package private) static int |
NETWORK_BUFFER_SIZE |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
byte[] initialSocketData,
List<I2PSocket> sockList)
Deprecated.
use FailCallback constructor
|
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
byte[] initialSocketData,
List<I2PSocket> sockList,
I2PTunnelRunner.FailCallback onFail)
Recommended new constructor.
|
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
byte[] initialSocketData,
List<I2PSocket> sockList,
Runnable onTimeout)
Deprecated.
use FailCallback constructor
|
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
List<I2PSocket> sockList)
Deprecated.
use FailCallback constructor
|
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
List<I2PSocket> sockList,
Runnable onTimeout)
Deprecated.
use FailCallback constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
close(OutputStream out,
InputStream in,
OutputStream i2pout,
InputStream i2pin,
Socket s,
I2PSocket i2ps,
Thread t1,
Thread t2) |
void |
errorOccurred()
Deprecated, unimplemented in streaming, never called.
|
long |
getLastActivityOn()
Deprecated.
unused
|
protected InputStream |
getSocketIn() |
protected OutputStream |
getSocketOut() |
long |
getStartedOn()
When this runner started up transferring data
|
boolean |
isFinished()
Deprecated.
unused
|
void |
run() |
addOOMEventThreadListener, fireOOM, removeOOMEventThreadListener
addOOMEventListener, removeOOMEventListener, start
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
protected final Log _log
static int MAX_PACKET_SIZE
static final int NETWORK_BUFFER_SIZE
@Deprecated public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList)
slock
- the socket lock, non-nullinitialI2PData
- may be nullsockList
- may be null. Caller must add i2ps to the list! It will be removed here on completion.
Will synchronize on slock when removing.@Deprecated public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, byte[] initialSocketData, List<I2PSocket> sockList)
slock
- the socket lock, non-nullinitialI2PData
- may be nullinitialSocketData
- may be nullsockList
- may be null. Caller must add i2ps to the list! It will be removed here on completion.
Will synchronize on slock when removing.@Deprecated public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList, Runnable onTimeout)
slock
- the socket lock, non-nullinitialI2PData
- may be nullsockList
- may be null. Caller must add i2ps to the list! It will be removed here on completion.
Will synchronize on slock when removing.onTimeout
- May be null. If non-null and no data (except initial data) was received,
it will be run before closing s.@Deprecated public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, byte[] initialSocketData, List<I2PSocket> sockList, Runnable onTimeout)
slock
- the socket lock, non-nullinitialI2PData
- may be nullinitialSocketData
- may be nullsockList
- may be null. Caller must add i2ps to the list! It will be removed here on completion.
Will synchronize on slock when removing.onTimeout
- May be null. If non-null and no data (except initial data) was received,
it will be run before closing s.public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, byte[] initialSocketData, List<I2PSocket> sockList, I2PTunnelRunner.FailCallback onFail)
slock
- the socket lock, non-nullinitialI2PData
- may be nullinitialSocketData
- may be nullsockList
- may be null. Caller must add i2ps to the list! It will be removed here on completion.
Will synchronize on slock when removing.onFail
- May be null. If non-null and no data (except initial data) was received,
it will be run before closing s.@Deprecated public boolean isFinished()
@Deprecated public long getLastActivityOn()
public long getStartedOn()
protected InputStream getSocketIn() throws IOException
IOException
protected OutputStream getSocketOut() throws IOException
IOException
protected void close(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, I2PSocket i2ps, Thread t1, Thread t2) throws InterruptedException
InterruptedException
public void errorOccurred()
errorOccurred
in interface I2PSocket.SocketErrorListener