class ChannelSession extends Channel
Channel.MyPipedInputStream, Channel.PassiveInputStream, Channel.PassiveOutputStream
Modifier and Type | Field and Description |
---|---|
private static byte[] |
_session |
protected boolean |
agent_forwarding |
protected java.util.Hashtable |
env |
protected boolean |
pty |
protected int |
tcol |
protected byte[] |
terminal_mode |
protected int |
thp |
protected int |
trow |
protected java.lang.String |
ttype |
protected int |
twp |
protected boolean |
xforwading |
close, connected, connectTimeout, eof_local, eof_remote, exitstatus, id, index, io, lmpsize, lwsize, lwsize_max, notifyme, open_confirmation, recipient, reply, rmpsize, rwsize, SSH_MSG_CHANNEL_OPEN_CONFIRMATION, SSH_MSG_CHANNEL_OPEN_FAILURE, SSH_MSG_CHANNEL_WINDOW_ADJUST, SSH_OPEN_ADMINISTRATIVELY_PROHIBITED, SSH_OPEN_CONNECT_FAILED, SSH_OPEN_RESOURCE_SHORTAGE, SSH_OPEN_UNKNOWN_CHANNEL_TYPE, thread, type
Constructor and Description |
---|
ChannelSession() |
Modifier and Type | Method and Description |
---|---|
private java.util.Hashtable |
getEnv() |
void |
run() |
protected void |
sendRequests() |
void |
setAgentForwarding(boolean enable)
Enable the agent forwarding.
|
void |
setEnv(byte[] name,
byte[] value)
Set the environment variable.
|
void |
setEnv(java.util.Hashtable env)
Deprecated.
Use
setEnv(String, String) or setEnv(byte[], byte[]) instead. |
void |
setEnv(java.lang.String name,
java.lang.String value)
Set the environment variable.
|
void |
setPty(boolean enable)
Allocate a Pseudo-Terminal.
|
void |
setPtySize(int col,
int row,
int wp,
int hp)
Change the window dimension interactively.
|
void |
setPtyType(java.lang.String ttype)
Set the terminal type.
|
void |
setPtyType(java.lang.String ttype,
int col,
int row,
int wp,
int hp)
Set the terminal type.
|
void |
setTerminalMode(byte[] terminal_mode)
Set the terminal mode.
|
void |
setXForwarding(boolean enable)
Enable the X11 forwarding.
|
private byte[] |
toByteArray(java.lang.Object o) |
addRemoteWindowSize, close, connect, connect, del, disconnect, disconnect, eof_remote, eof, genChannelOpenPacket, getChannel, getChannel, getData, getExitStatus, getExtInputStream, getId, getInputStream, getOutputStream, getRecipient, getSession, init, isClosed, isConnected, isEOF, sendChannelOpen, sendOpenConfirmation, sendOpenFailure, sendSignal, setExitStatus, setExtOutputStream, setExtOutputStream, setInputStream, setInputStream, setLocalPacketSize, setLocalWindowSize, setLocalWindowSizeMax, setOutputStream, setOutputStream, setRecipient, setRemotePacketSize, setRemoteWindowSize, setSession, start, write_ext, write, write
private static byte[] _session
protected boolean agent_forwarding
protected boolean xforwading
protected java.util.Hashtable env
protected boolean pty
protected java.lang.String ttype
protected int tcol
protected int trow
protected int twp
protected int thp
protected byte[] terminal_mode
public void setAgentForwarding(boolean enable)
enable
- public void setXForwarding(boolean enable)
setXForwarding
in class Channel
enable
- public void setEnv(java.util.Hashtable env)
setEnv(String, String)
or setEnv(byte[], byte[])
instead.setEnv(String, String)
,
setEnv(byte[], byte[])
public void setEnv(java.lang.String name, java.lang.String value)
name
and value
are needed to be passed
to the remote in your favorite encoding,
use setEnv(byte[], byte[])
.
Refer to RFC4254 6.4 Environment Variable Passing.name
- A name for environment variable.value
- A value for environment variable.public void setEnv(byte[] name, byte[] value)
name
- A name of environment variable.value
- A value of environment variable.setEnv(String, String)
private java.util.Hashtable getEnv()
public void setPty(boolean enable)
enable
- public void setTerminalMode(byte[] terminal_mode)
terminal_mode
- public void setPtySize(int col, int row, int wp, int hp)
col
- terminal width, columnsrow
- terminal height, rowswp
- terminal width, pixelshp
- terminal height, pixelspublic void setPtyType(java.lang.String ttype)
ttype
- terminal type(for example, "vt100")setPtyType(String, int, int, int, int)
public void setPtyType(java.lang.String ttype, int col, int row, int wp, int hp)
ttype
- terminal type(for example, "vt100")col
- terminal width, columnsrow
- terminal height, rowswp
- terminal width, pixelshp
- terminal height, pixelsprotected void sendRequests() throws java.lang.Exception
java.lang.Exception
private byte[] toByteArray(java.lang.Object o)