Package hudson.remoting.forward
Class PortForwarder
java.lang.Object
java.lang.Thread
hudson.remoting.forward.PortForwarder
- All Implemented Interfaces:
ListeningPort
,Closeable
,AutoCloseable
,Runnable
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
Modifier and TypeFieldDescriptionstatic final 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
ROLE
Deprecated.Role that's willing to listen on a socket and forward that to the other side.
-
-
Constructor Details
-
PortForwarder
Deprecated.- Throws:
IOException
-
-
Method Details
-
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
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
-