public class SshTunnelerConnection
extends java.lang.Thread
Constructor and Description |
---|
SshTunnelerConnection(java.net.Socket socket,
SshParameters params,
java.lang.String remoteIp,
int remotePort)
Creates a new Ssh tunneler connection.
|
Modifier and Type | Method and Description |
---|---|
void |
addServiceEndedListener(com.jscape.inet.ipclientssh.SshTunnelerConnection.SshServiceEndListener listener)
Adds services ended listener.
|
void |
disconnect()
Disconnect current ssh connection and current local connection.
|
void |
fireServiceEnded()
Fires services ended event.
|
void |
removeServiceEndedListener(com.jscape.inet.ipclientssh.SshTunnelerConnection.SshServiceEndListener listener)
Removes serviceEndedListener.
|
void |
run()
Starts the service.
|
void |
startService()
Starts service.
|
activeCount, checkAccess, 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
public SshTunnelerConnection(java.net.Socket socket, SshParameters params, java.lang.String remoteIp, int remotePort)
socket
- The socket local connection.params
- Ssh parameters.remoteIp
- Remote IP.remotePort
- Remote port.public void disconnect() throws java.lang.Exception
java.lang.Exception
- If an error occurs.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void startService() throws java.lang.Exception
java.lang.Exception
- If an error occurs.public void fireServiceEnded()
public void addServiceEndedListener(com.jscape.inet.ipclientssh.SshTunnelerConnection.SshServiceEndListener listener)
listener
- SshServiceEndListener instance.public void removeServiceEndedListener(com.jscape.inet.ipclientssh.SshTunnelerConnection.SshServiceEndListener listener)
listener
- Listener will be removed.Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved