Package net.i2p.i2ptunnel
Class I2PTunnelOutproxyRunner
- java.lang.Object
-
- java.lang.Thread
-
- net.i2p.util.I2PThread
-
- net.i2p.util.I2PAppThread
-
- net.i2p.i2ptunnel.I2PTunnelOutproxyRunner
-
- All Implemented Interfaces:
Runnable
public class I2PTunnelOutproxyRunner extends I2PAppThread
Like I2PTunnelRunner but socket-to-socket Warning - not maintained as a stable API for external use.- Since:
- 0.9.11
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.i2p.util.I2PThread
I2PThread.OOMEventListener
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Log
_log
(package private) boolean
finished
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description I2PTunnelOutproxyRunner(Socket s, Socket i2ps, Object slock, byte[] initialI2PData, byte[] initialSocketData, I2PTunnelRunner.FailCallback onTimeout)
Does NOT start itself.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
close(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, Socket i2ps, Thread t1, Thread t2)
void
errorOccurred()
long
getLastActivityOn()
Deprecated.unusedprotected InputStream
getSocketIn()
protected OutputStream
getSocketOut()
long
getStartedOn()
When this runner started up transferring databoolean
isFinished()
Deprecated.unusedvoid
run()
-
Methods inherited from class net.i2p.util.I2PAppThread
addOOMEventThreadListener, fireOOM, removeOOMEventThreadListener
-
Methods inherited from class net.i2p.util.I2PThread
addOOMEventListener, removeOOMEventListener, start
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
_log
protected final Log _log
-
finished
volatile boolean finished
-
-
Constructor Detail
-
I2PTunnelOutproxyRunner
public I2PTunnelOutproxyRunner(Socket s, Socket i2ps, Object slock, byte[] initialI2PData, byte[] initialSocketData, I2PTunnelRunner.FailCallback onTimeout)
Does NOT start itself. Caller must call start().- Parameters:
slock
- the socket lock, non-nullinitialI2PData
- may be nullonTimeout
- May be null. If non-null and no data (except initial data) was received, it will be run before closing s.
-
-
Method Detail
-
isFinished
@Deprecated public boolean isFinished()
Deprecated.unusedhave we closed at least one (if not both) of the streams [aka we're done running the streams]?
-
getLastActivityOn
@Deprecated public long getLastActivityOn()
Deprecated.unusedWhen was the last data for this runner sent or received? As of 0.9.20, returns -1 always!- Returns:
- date (ms since the epoch), or -1 if no data has been transferred yet
-
getStartedOn
public long getStartedOn()
When this runner started up transferring data
-
getSocketIn
protected InputStream getSocketIn() throws IOException
- Throws:
IOException
-
getSocketOut
protected OutputStream getSocketOut() throws IOException
- Throws:
IOException
-
close
protected void close(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, Socket i2ps, Thread t1, Thread t2) throws InterruptedException
- Throws:
InterruptedException
-
errorOccurred
public void errorOccurred()
-
-