com.jscape.inet.telnetssl

## Class TelnetSsl

- java.lang.Object
- - com.jscape.inet.telnet.Telnet
  - - com.jscape.inet.telnetssl.TelnetSsl

- All Implemented Interfaces:
    java.io.Serializable

      public class TelnetSsl
      extends Telnet

  Implements a secure telnet client using SSL/TLS.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.jscape.inet.telnet.Telnet

      `Telnet.ByteDecoder, Telnet.DefaultDecoder, Telnet.EUCKoreanDecoder, Telnet.UTF8Decoder`

  - ### Field Summary

    - ### Fields inherited from class com.jscape.inet.telnet.Telnet

      `COMMAND_MAP, TC_AO, TC_AYT, TC_BRK, TC_DM, TC_DO, TC_DONT, TC_GA, TC_IP, TC_NOP, TC_SB, TC_SE, TC_WILL, TC_WONT, TSC_BEL, TSC_BS, TSC_CR, TSC_EC, TSC_EL, TSC_FF, TSC_HT, TSC_IAC, TSC_LF, TSC_NULL, TSC_VT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TelnetSsl(java.lang.String hostname)` Constructs a new TelnetSsl instance
    `TelnetSsl(java.lang.String hostname, int port)` Constructs a new TelnetSsl instance

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearProxySettings()` Clears proxy server values.
    `void` | `connect()` Establishes connection to telnet server using SSL/TLS.
    `void` | `disconnect()` Disconnects from telnet server.
    `void` | `setClientCertificates(java.lang.String filename, java.lang.String password)` Sets optional client certificate to be used during authentication.
    `void` | `setClientCertificates(java.lang.String filename, java.lang.String password, java.lang.String storetype)` Sets optional client certificate to be used during authentication.
    `void` | `setProxyAuthentication(java.lang.String proxyUsername, java.lang.String proxyPassword)` Sets the username and password to use when for authentication with proxy server.
    `void` | `setProxyHost(java.lang.String proxyHostname, int proxyPort)` Sets the proxy hostname and port for this connection.
    `void` | `setProxyType(java.lang.String proxyType)` Sets the proxy type will be used for this connection.
    `void` | `setServerCertificates(java.lang.String filename, java.lang.String password)` Sets optional server certificate to be used during authentication.
    `void` | `setServerCertificates(java.lang.String filename, java.lang.String password, java.lang.String storetype)` Sets optional server certificate to be used during authentication.

    - ### Methods inherited from class com.jscape.inet.telnet.Telnet

      `addTelnetListener, getCharacterSet, getCommandName, getDebug, getDebugStream, getHostname, getInputStream, getOutputStream, getPort, getReader, getReadingTimeout, getTimeout, getWriter, removeTelnetListener, sendCommand, sendCommand, sendDontOption, sendDoOption, sendOptionSubnegotiation, sendWillOption, sendWontOption, setCharacterSet, setDebug, setDebugStream, setHostname, setPort, setReadingTimeout, setTimeout`

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

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

- - ### Constructor Detail

    - #### TelnetSsl

          public TelnetSsl(java.lang.String hostname)

      Constructs a new TelnetSsl instance
      Parameters:
        `hostname` - the telnet server hostname

    - #### TelnetSsl

          public TelnetSsl(java.lang.String hostname,
                           int port)

      Constructs a new TelnetSsl instance
      Parameters:
        `hostname` - the server hostname
        `port` - the server port

  - ### Method Detail

    - #### connect

          public void connect()
                       throws TelnetException

      Establishes connection to telnet server using SSL/TLS.
      Overrides:
        `connect` in class `Telnet`
      Throws:
        `TelnetException` - if an I/O or telnet related error occurs

    - #### disconnect

          public void disconnect()

      Disconnects from telnet server.
      Overrides:
        `disconnect` in class `Telnet`

    - #### setServerCertificates

          public void setServerCertificates(java.lang.String filename,
                                            java.lang.String password)

      Sets optional server certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

           keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the server certificate
        `password` - the keystore password

    - #### setServerCertificates

          public void setServerCertificates(java.lang.String filename,
                                            java.lang.String password,
                                            java.lang.String storetype)

      Sets optional server certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

           keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the server certificate
        `password` - the keystore password
        `storetype` - the keystore type valid values include jks and pkcs12

    - #### setClientCertificates

          public void setClientCertificates(java.lang.String filename,
                                            java.lang.String password)

      Sets optional client certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

           keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the client certificate
        `password` - the keystore password

    - #### setClientCertificates

          public void setClientCertificates(java.lang.String filename,
                                            java.lang.String password,
                                            java.lang.String storetype)

      Sets optional client certificate to be used during authentication. Default expected keystore format is JKS format. Existing certificate may be imported into keystore using the `keytool` utility provided in the Sun JDK.

      Example:

           keytool.exe -import -file x509.cer -keystore your_store_name

      The example above imports the certificate x509.cer into a keystore named your_store_name

      Parameters:
        `filename` - the keystore file containing the client certificate
        `password` - the keystore password
        `storetype` - the keystore type valid values include jks and pkcs12

    - #### setProxyAuthentication

          public void setProxyAuthentication(java.lang.String proxyUsername,
                                             java.lang.String proxyPassword)

      Sets the username and password to use when for authentication with proxy server. To clear these settings invoke the `#clearProxySettings` method.
      Overrides:
        `setProxyAuthentication` in class `Telnet`
      Parameters:
        `proxyUsername` - the proxy username
        `proxyPassword` - the proxy password
      See Also:
        `clearProxySettings()`

    - #### setProxyHost

          public void setProxyHost(java.lang.String proxyHostname,
                                   int proxyPort)

      Sets the proxy hostname and port for this connection. To clear these settings invoke the `#clearProxySettings` method.
      Overrides:
        `setProxyHost` in class `Telnet`
      Parameters:
        `proxyHostname` - the hostname or ip address of the proxy server
        `proxyPort` - the port of the proxy server
      See Also:
        `clearProxySettings()`

    - #### setProxyType

          public void setProxyType(java.lang.String proxyType)

      Sets the proxy type will be used for this connection.
      Overrides:
        `setProxyType` in class `Telnet`
      Parameters:
        `proxyType` - The proxy type. Valid values: HTTP, SOCKS5

    - #### clearProxySettings

          public void clearProxySettings()

      Clears proxy server values.
      Overrides:
        `clearProxySettings` in class `Telnet`

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