public class PortForwarder extends Thread implements Closeable, ListeningPort
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
PortForwarder(int localPort,
Forwarder forwarder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shuts down this port forwarder.
|
static ListeningPort |
create(VirtualChannel ch,
int acceptingPort,
Forwarder forwarder)
Starts a
PortForwarder accepting remotely at the given channel,
which connects by using the given connector. |
int |
getPort()
TCP/IP port that is listening.
|
void |
run() |
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, start, stop, stop, suspend, toString, yieldpublic PortForwarder(int localPort,
Forwarder forwarder)
throws IOException
IOExceptionpublic int getPort()
ListeningPortgetPort in interface ListeningPortpublic void close()
throws IOException
close in interface ListeningPortclose in interface Closeableclose in interface AutoCloseableIOExceptionpublic static ListeningPort create(VirtualChannel ch, int acceptingPort, Forwarder forwarder) throws IOException, InterruptedException
PortForwarder accepting remotely at the given channel,
which connects by using the given connector.Closeable that can be used to shut the port forwarding down.IOExceptionInterruptedExceptionCopyright © 2004-2014. All Rights Reserved.