Package org.apache.sshd.common.channel
Class Window
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.channel.Window
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ChannelHolder
- Direct Known Subclasses:
LocalWindow
,RemoteWindow
A
Channel
implements a sliding window flow control for data packets (SSH_MSG_CHANNEL_DATA and
SSH_MSG_CHANNEL_EXTENDED_DATA packets). Each channel has two windows, a local window describing how much data it is
prepared to receive (and the peer is allowed to send), and a remote window that reflects this side's view of the
peer's local window. When the local window size is zero, no data should be received; when the remote window size is
zero, no data should be sent. Peers update the other's remote window periodically, but at the latest when a window is
exhausted, by sending SSH_MSG_CHANNEL_WINDOW_ADJUST messages.- Author:
- Apache MINA SSHD Project
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkInitialized
(String location) void
close()
abstract void
consume
(long len) long
long
long
getSize()
protected void
init
(long size, long packetSize, PropertyResolver resolver) boolean
isOpen()
largerThan
(long minSize) toString()
protected void
updateSize
(long size)
-
Field Details
-
lock
-
-
Constructor Details
-
Window
-
-
Method Details
-
largerThan
-
getChannel
- Specified by:
getChannel
in interfaceChannelHolder
- Returns:
- The associated
Channel
instance
-
getSize
public long getSize() -
getMaxSize
public long getMaxSize() -
getPacketSize
public long getPacketSize() -
init
-
consume
- Throws:
IOException
-
updateSize
protected void updateSize(long size) -
checkInitialized
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
toString
-