com.jscape.inet.ipclientssh

## Class SshTunnelerConnection

- java.lang.Object
- - java.lang.Thread
  - - com.jscape.inet.ipclientssh.SshTunnelerConnection

- All Implemented Interfaces:
    java.lang.Runnable

      public class SshTunnelerConnection
      extends java.lang.Thread

  Ssh Tunneler connection service.
  Author:
    Alvaro

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SshTunnelerConnection(java.net.Socket socket, SshParameters params, java.lang.String remoteIp, int remotePort)` Creates a new Ssh tunneler connection.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class java.lang.Thread

      `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`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### SshTunnelerConnection

          public SshTunnelerConnection(java.net.Socket socket,
                                       SshParameters params,
                                       java.lang.String remoteIp,
                                       int remotePort)

      Creates a new Ssh tunneler connection.
      Parameters:
        `socket` - The socket local connection.
        `params` - Ssh parameters.
        `remoteIp` - Remote IP.
        `remotePort` - Remote port.

  - ### Method Detail

    - #### disconnect

          public void disconnect()
                          throws java.lang.Exception

      Disconnect current ssh connection and current local connection.
      Throws:
        `java.lang.Exception` - If an error occurs.

    - #### run

          public void run()

      Starts the service.
      Specified by:
        `run` in interface `java.lang.Runnable`
      Overrides:
        `run` in class `java.lang.Thread`

    - #### startService

          public void startService()
                            throws java.lang.Exception

      Starts service.
      Throws:
        `java.lang.Exception` - If an error occurs.

    - #### fireServiceEnded

          public void fireServiceEnded()

      Fires services ended event.

    - #### addServiceEndedListener

          public void addServiceEndedListener(com.jscape.inet.ipclientssh.SshTunnelerConnection.SshServiceEndListener listener)

      Adds services ended listener.
      Parameters:
        `listener` - SshServiceEndListener instance.

    - #### removeServiceEndedListener

          public void removeServiceEndedListener(com.jscape.inet.ipclientssh.SshTunnelerConnection.SshServiceEndListener listener)

      Removes serviceEndedListener.
      Parameters:
        `listener` - Listener will be removed.

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved