Module bus.extra

Enum Class ChannelType

java.lang.Object
java.lang.Enum<ChannelType>
org.miaixz.bus.extra.ssh.provider.jsch.ChannelType
All Implemented Interfaces:
Serializable, Comparable<ChannelType>, Constable

public enum ChannelType extends Enum<ChannelType>
Enumeration of channel types supported by JSch (Java Secure Channel). Each enum constant corresponds to a specific type of SSH channel that can be opened.
Since:
Java 17+
Author:
Kimi Liu
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Agent forwarding channel type, used for forwarding authentication agent connections.
    Direct TCP/IP forwarding channel type, used for local port forwarding.
    Exec channel type, used for executing a single remote command.
    Forwarded TCP/IP channel type, used for remote port forwarding.
    Session channel type, a general-purpose channel.
    SFTP channel type, used for Secure File Transfer Protocol sessions.
    Shell channel type, used for interactive shell sessions.
    Subsystem channel type, used for accessing predefined subsystems on the server (e.g., sftp).
    X11 forwarding channel type, used for forwarding X11 graphical user interface sessions.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the string value of the channel type.
    Returns the enum constant of this class with the specified name.
    static ChannelType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SESSION

      public static final ChannelType SESSION
      Session channel type, a general-purpose channel.
    • SHELL

      public static final ChannelType SHELL
      Shell channel type, used for interactive shell sessions.
    • EXEC

      public static final ChannelType EXEC
      Exec channel type, used for executing a single remote command.
    • X11

      public static final ChannelType X11
      X11 forwarding channel type, used for forwarding X11 graphical user interface sessions.
    • AGENT_FORWARDING

      public static final ChannelType AGENT_FORWARDING
      Agent forwarding channel type, used for forwarding authentication agent connections.
    • DIRECT_TCPIP

      public static final ChannelType DIRECT_TCPIP
      Direct TCP/IP forwarding channel type, used for local port forwarding.
    • FORWARDED_TCPIP

      public static final ChannelType FORWARDED_TCPIP
      Forwarded TCP/IP channel type, used for remote port forwarding.
    • SFTP

      public static final ChannelType SFTP
      SFTP channel type, used for Secure File Transfer Protocol sessions.
    • SUBSYSTEM

      public static final ChannelType SUBSYSTEM
      Subsystem channel type, used for accessing predefined subsystems on the server (e.g., sftp).
  • Method Details

    • values

      public static ChannelType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ChannelType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Retrieves the string value of the channel type. This value is used when opening a channel with JSch's openChannel method.
      Returns:
      The string value of the channel type.