public class I2PTunnelHTTPClientRunner extends I2PTunnelRunner
I2PTunnelRunner.FailCallback, I2PTunnelRunner.SuccessCallback
I2PThread.OOMEventListener
Thread.State, Thread.UncaughtExceptionHandler
_keepAliveI2P, _keepAliveSocket, _log, MAX_PACKET_SIZE, NETWORK_BUFFER_SIZE
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
I2PTunnelHTTPClientRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
List<I2PSocket> sockList,
I2PTunnelRunner.FailCallback onFail)
Deprecated.
use other constructor
|
I2PTunnelHTTPClientRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
List<I2PSocket> sockList,
I2PTunnelRunner.FailCallback onFail,
boolean allowKeepAliveI2P,
boolean allowKeepAliveSocket,
boolean isHead)
Does NOT start itself.
|
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)
May not actually close either socket, depending on keepalive settings.
|
(package private) boolean |
getKeepAliveI2P()
Should we keep the I2P socket open when done?
|
(package private) boolean |
getKeepAliveSocket()
Should we keep the local browser socket open when done?
|
protected OutputStream |
getSocketOut()
Only call once!
|
errorOccurred, getLastActivityOn, getSocketIn, getStartedOn, isFinished, run, setSuccessCallback, streamDone
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
@Deprecated public I2PTunnelHTTPClientRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList, I2PTunnelRunner.FailCallback onFail)
public I2PTunnelHTTPClientRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList, I2PTunnelRunner.FailCallback onFail, boolean allowKeepAliveI2P, boolean allowKeepAliveSocket, boolean isHead)
allowKeepAliveI2P
- we may, but are not required to, keep the I2P socket alive
- Requires allowKeepAliveSocketallowKeepAliveSocket
- we may, but are not required to, keep the browser-side socket alive
NO data will be forwarded from the socket to the i2psocket other than
initialI2PData if this is true.isHead
- is this a response to a HEAD, and thus no data is expected (RFC 2616 sec. 4.4)protected OutputStream getSocketOut() throws IOException
getSocketOut
in class I2PTunnelRunner
IllegalStateException
- if called againIOException
boolean getKeepAliveSocket()
getKeepAliveSocket
in class I2PTunnelRunner
boolean getKeepAliveI2P()
getKeepAliveI2P
in class I2PTunnelRunner
protected void close(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, I2PSocket i2ps, Thread t1, Thread t2) throws InterruptedException
close
in class I2PTunnelRunner
out
- may be nullin
- may be nulli2pout
- may be nulli2pin
- may be nulls
- non-nulli2ps
- non-nullt1
- may be nullt2
- may be null, ignored, we only join t1InterruptedException