Package com.jcraft.jsch
Class ChannelSubsystem
- java.lang.Object
-
- com.jcraft.jsch.Channel
-
- com.jcraft.jsch.ChannelSubsystem
-
- All Implemented Interfaces:
java.lang.Runnable
public class ChannelSubsystem extends Channel
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanagent_forwardingprotected java.util.Hashtableenvprotected inttcolprotected byte[]terminal_modeprotected intthpprotected inttrowprotected java.lang.Stringttypeprotected inttwp
-
Constructor Summary
Constructors Constructor Description ChannelSubsystem()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.io.InputStreamgetErrStream()voidrun()protected voidsendRequests()voidsetAgentForwarding(boolean enable)Enable the agent forwarding.voidsetEnv(byte[] name, byte[] value)Set the environment variable.voidsetEnv(java.lang.String name, java.lang.String value)Set the environment variable.voidsetEnv(java.util.Hashtable env)Deprecated.UsesetEnv(String, String)orsetEnv(byte[], byte[])instead.voidsetErrStream(java.io.OutputStream out)voidsetPty(boolean foo)Allocate a Pseudo-Terminal.voidsetPtySize(int col, int row, int wp, int hp)Change the window dimension interactively.voidsetPtyType(java.lang.String ttype)Set the terminal type.voidsetPtyType(java.lang.String ttype, int col, int row, int wp, int hp)Set the terminal type.voidsetSubsystem(java.lang.String foo)voidsetTerminalMode(byte[] terminal_mode)Set the terminal mode.voidsetWantReply(boolean foo)voidsetXForwarding(boolean foo)Enable the X11 forwarding.voidstart()-
Methods inherited from class com.jcraft.jsch.Channel
connect, connect, disconnect, genChannelOpenPacket, getExitStatus, getExtInputStream, getId, getInputStream, getOutputStream, getSession, isClosed, isConnected, isEOF, sendChannelOpen, sendOpenConfirmation, sendOpenFailure, sendSignal, setExtOutputStream, setExtOutputStream, setInputStream, setInputStream, setOutputStream, setOutputStream
-
-
-
-
Method Detail
-
setXForwarding
public void setXForwarding(boolean foo)
Enable the X11 forwarding. Refer to RFC4254 6.3.1. Requesting X11 Forwarding.
-
setPty
public void setPty(boolean foo)
Allocate a Pseudo-Terminal. Refer to RFC4254 6.2. Requesting a Pseudo-Terminal.
-
setWantReply
public void setWantReply(boolean foo)
-
setSubsystem
public void setSubsystem(java.lang.String foo)
-
start
public void start() throws JSchException- Overrides:
startin classChannel- Throws:
JSchException
-
setErrStream
public void setErrStream(java.io.OutputStream out)
-
getErrStream
public java.io.InputStream getErrStream() throws java.io.IOException- Throws:
java.io.IOException
-
setAgentForwarding
public void setAgentForwarding(boolean enable)
Enable the agent forwarding.- Parameters:
enable-
-
setEnv
public void setEnv(java.util.Hashtable env)
Deprecated.UsesetEnv(String, String)orsetEnv(byte[], byte[])instead.- See Also:
setEnv(String, String),setEnv(byte[], byte[])
-
setEnv
public void setEnv(java.lang.String name, java.lang.String value)Set the environment variable. Ifnameandvalueare needed to be passed to the remote in your favorite encoding, usesetEnv(byte[], byte[]). Refer to RFC4254 6.4 Environment Variable Passing.- Parameters:
name- A name for environment variable.value- A value for environment variable.
-
setEnv
public void setEnv(byte[] name, byte[] value)Set the environment variable. Refer to RFC4254 6.4 Environment Variable Passing.- Parameters:
name- A name of environment variable.value- A value of environment variable.- See Also:
setEnv(String, String)
-
setTerminalMode
public void setTerminalMode(byte[] terminal_mode)
Set the terminal mode.- Parameters:
terminal_mode-
-
setPtySize
public void setPtySize(int col, int row, int wp, int hp)Change the window dimension interactively. Refer to RFC4254 6.7. Window Dimension Change Message.- Parameters:
col- terminal width, columnsrow- terminal height, rowswp- terminal width, pixelshp- terminal height, pixels
-
setPtyType
public void setPtyType(java.lang.String ttype)
Set the terminal type. This method is not effective after Channel#connect().- Parameters:
ttype- terminal type(for example, "vt100")- See Also:
setPtyType(String, int, int, int, int)
-
setPtyType
public void setPtyType(java.lang.String ttype, int col, int row, int wp, int hp)Set the terminal type. This method is not effective after Channel#connect().- Parameters:
ttype- terminal type(for example, "vt100")col- terminal width, columnsrow- terminal height, rowswp- terminal width, pixelshp- terminal height, pixels
-
sendRequests
protected void sendRequests() throws java.lang.Exception- Throws:
java.lang.Exception
-
-