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
FieldsModifier and TypeFieldDescriptionstatic final RoleDeprecated.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 -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Shuts down this port forwarder.static ListeningPortcreate(VirtualChannel ch, int acceptingPort, Forwarder forwarder) Deprecated.Starts aPortForwarderaccepting remotely at the given channel, which connects by using the given connector.intgetPort()Deprecated.TCP/IP port that is listening.voidrun()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:ListeningPortTCP/IP port that is listening.- Specified by:
getPortin interfaceListeningPort
-
run
public void run()Deprecated. -
close
Deprecated.Shuts down this port forwarder.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceListeningPort- Throws:
IOException
-
create
public static ListeningPort create(VirtualChannel ch, int acceptingPort, Forwarder forwarder) throws IOException, InterruptedException Deprecated.Starts aPortForwarderaccepting remotely at the given channel, which connects by using the given connector.- Returns:
- A
Closeablethat can be used to shut the port forwarding down. - Throws:
IOExceptionInterruptedException
-