@Deprecated public class PortForwarder extends Thread implements Closeable, ListeningPort
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static Role |
ROLE
Deprecated.
Role that's willing to listen on a socket and forward that to the other side.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
PortForwarder(int localPort,
Forwarder forwarder)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Shuts down this port forwarder.
|
static ListeningPort |
create(VirtualChannel ch,
int acceptingPort,
Forwarder forwarder)
Deprecated.
Starts a
PortForwarder accepting remotely at the given channel,
which connects by using the given connector. |
int |
getPort()
Deprecated.
TCP/IP port that is listening.
|
void |
run()
Deprecated.
|
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, yield
public static final Role ROLE
public PortForwarder(int localPort, Forwarder forwarder) throws IOException
IOException
public int getPort()
ListeningPort
getPort
in interface ListeningPort
public void run()
public void close() throws IOException
close
in interface ListeningPort
close
in interface Closeable
close
in interface AutoCloseable
IOException
public 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.IOException
InterruptedException
Copyright © 2004–2022. All rights reserved.