- All Implemented Interfaces:
Serializable,Comparable<ChannelType>,Constable
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 ConstantsEnum ConstantDescriptionAgent 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 TypeMethodDescriptiongetValue()Retrieves the string value of the channel type.static ChannelTypeReturns the enum constant of this class with the specified name.static ChannelType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SESSION
Session channel type, a general-purpose channel. -
SHELL
Shell channel type, used for interactive shell sessions. -
EXEC
Exec channel type, used for executing a single remote command. -
X11
X11 forwarding channel type, used for forwarding X11 graphical user interface sessions. -
AGENT_FORWARDING
Agent forwarding channel type, used for forwarding authentication agent connections. -
DIRECT_TCPIP
Direct TCP/IP forwarding channel type, used for local port forwarding. -
FORWARDED_TCPIP
Forwarded TCP/IP channel type, used for remote port forwarding. -
SFTP
SFTP channel type, used for Secure File Transfer Protocol sessions. -
SUBSYSTEM
Subsystem channel type, used for accessing predefined subsystems on the server (e.g., sftp).
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
Retrieves the string value of the channel type. This value is used when opening a channel with JSch'sopenChannelmethod.- Returns:
- The string value of the channel type.
-