Class Channel
java.lang.Object
com.jcraft.jsch.Channel
- Direct Known Subclasses:
ChannelDirectTCPIP, ChannelExec, ChannelForwardedTCPIP, ChannelSftp, ChannelShell, ChannelSubsystem
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()voidconnect(int connectTimeout) voidprotected com.jcraft.jsch.PacketintintgetId()intGets the maximum local packet size.intGets the maximum local window size.booleanisClosed()booleanbooleanisEOF()protected voidprotected voidprotected voidsendOpenFailure(int reasoncode) voidsendSignal(String signal) voidvoidsetExtOutputStream(OutputStream out, boolean dontclose) voidvoidsetInputStream(InputStream in, boolean dontclose) voidsetLocalPacketSize(int size) Sets the maximum local packet size.voidsetLocalWindowSizeMax(int size) Sets the maximum local window size.voidvoidsetOutputStream(OutputStream out, boolean dontclose) voidsetXForwarding(boolean foo) voidstart()
-
Field Details
-
type
protected byte[] type -
session
-
-
Method Details
-
connect
- Throws:
JSchException
-
connect
- Throws:
JSchException
-
setXForwarding
public void setXForwarding(boolean foo) -
start
- Throws:
JSchException
-
isEOF
public boolean isEOF() -
setInputStream
-
setInputStream
-
setOutputStream
-
setOutputStream
-
setExtOutputStream
-
setExtOutputStream
-
getInputStream
- Throws:
IOException
-
getExtInputStream
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
setLocalWindowSizeMax
Sets the maximum local window size.Both the maximum local window size and the initial local window size are set to the specified
size.- Parameters:
size- the maximum local window size in bytes- Throws:
JSchException- if the channel is already connected or ifsizeis not positive
-
getLocalWindowSizeMax
public int getLocalWindowSizeMax()Gets the maximum local window size.- Returns:
- the maximum local window size in bytes
-
setLocalPacketSize
Sets the maximum local packet size.- Parameters:
size- the maximum local packet size in bytes- Throws:
JSchException- if the channel is already connected, ifsizeis not positive, or ifsizeexceeds the maximum allowed packet size
-
getLocalPacketSize
public int getLocalPacketSize()Gets the maximum local packet size.- Returns:
- the maximum local packet size in bytes
-
isClosed
public boolean isClosed() -
disconnect
public void disconnect() -
isConnected
public boolean isConnected() -
sendSignal
-
getExitStatus
public int getExitStatus() -
getExitSignal
-
getSession
- Throws:
JSchException
-
getId
public int getId() -
sendOpenConfirmation
-
sendOpenFailure
protected void sendOpenFailure(int reasoncode) -
genChannelOpenPacket
protected com.jcraft.jsch.Packet genChannelOpenPacket() -
sendChannelOpen
-