hudson.remoting.forward
Class PortForwarder
java.lang.Object
java.lang.Thread
hudson.remoting.forward.PortForwarder
- All Implemented Interfaces:
- ListeningPort, Closeable, Runnable
public class PortForwarder
- extends Thread
- implements Closeable, ListeningPort
Port forwarder over a remote channel.
- Since:
- 1.315
- Author:
- Kohsuke Kawaguchi
| Methods inherited from class java.lang.Thread |
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 |
PortForwarder
public PortForwarder(int localPort,
Forwarder forwarder)
throws IOException
- Throws:
IOException
getPort
public int getPort()
- Description copied from interface:
ListeningPort
- TCP/IP port that is listening.
- Specified by:
getPort in interface ListeningPort
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
close
public void close()
throws IOException
- Shuts down this port forwarder.
- Specified by:
close in interface ListeningPort- Specified by:
close in interface Closeable
- Throws:
IOException
create
public static ListeningPort create(VirtualChannel ch,
int acceptingPort,
Forwarder forwarder)
throws IOException,
InterruptedException
- Starts a
PortForwarder 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
Copyright © 2004-2011. All Rights Reserved.