Package hudson.remoting.forward
Class PortForwarder
- java.lang.Object
-
- java.lang.Thread
-
- hudson.remoting.forward.PortForwarder
-
- All Implemented Interfaces:
ListeningPort
,Closeable
,AutoCloseable
,Runnable
@Deprecated public class PortForwarder extends Thread implements Closeable, ListeningPort
Deprecated.Port forwarder over a remote channel.- Since:
- 1.315
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description static Role
ROLE
Deprecated.Role that's willing to listen on a socket and forward that to the other side.-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description PortForwarder(int localPort, Forwarder forwarder)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Shuts down this port forwarder.static ListeningPort
create(VirtualChannel ch, int acceptingPort, Forwarder forwarder)
Deprecated.Starts aPortForwarder
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.-
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, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
ROLE
public static final Role ROLE
Deprecated.Role that's willing to listen on a socket and forward that to the other side.
-
-
Constructor Detail
-
PortForwarder
public PortForwarder(int localPort, Forwarder forwarder) throws IOException
Deprecated.- Throws:
IOException
-
-
Method Detail
-
getPort
public int getPort()
Deprecated.Description copied from interface:ListeningPort
TCP/IP port that is listening.- Specified by:
getPort
in interfaceListeningPort
-
run
public void run()
Deprecated.
-
close
public void close() throws IOException
Deprecated.Shuts down this port forwarder.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceListeningPort
- Throws:
IOException
-
create
public static ListeningPort create(VirtualChannel ch, int acceptingPort, Forwarder forwarder) throws IOException, InterruptedException
Deprecated.Starts aPortForwarder
accepting remotely at the given channel, which connects by using the given connector.- Returns:
- A
Closeable
that can be used to shut the port forwarding down. - Throws:
IOException
InterruptedException
-
-