public abstract class AbstractPortForward extends AbstractLifecycleComponent implements SshPortForward
SshPortForward that maintains the
isOpen() state for any sub-classes.LOCAL_FORWARDING, REMOTE_FORWARDING, X11_FORWARDING| Constructor and Description |
|---|
AbstractPortForward() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the tunnel.
|
int |
getTimeout()
Get a timeout in milliseconds for opening the forward
|
boolean |
isOpen()
Get if the tunnel is open or closed
|
protected abstract void |
onClose() |
protected abstract void |
onOpen() |
void |
open()
Open the tunnel.
|
void |
setTimeout(int timeout)
Set a timeout in milliseconds for opening the forward
|
addListener, fireClosed, fireClosing, fireOpened, getListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, removeListenerpublic void close()
throws SshException
SshPortForwardclose in interface SshPortForwardclose in interface SshLifecycleComponentSshException - on any errorpublic void setTimeout(int timeout)
SshPortForwardsetTimeout in interface SshPortForwardtimeout - timeoutpublic int getTimeout()
SshPortForwardgetTimeout in interface SshPortForwardpublic boolean isOpen()
SshPortForwardisOpen in interface SshPortForwardisOpen in interface SshLifecycleComponentSshLifecycleComponent.open(),
SshLifecycleComponent.close()public final void open()
throws SshException
SshPortForwardopen in interface SshPortForwardopen in interface SshLifecycleComponentSshException - on any error#close()}protected abstract void onOpen()
throws SshException
SshExceptionprotected abstract void onClose()
throws SshException
SshExceptionCopyright © 2018. All rights reserved.