Top Description Fields Constructors Methods
org.apache.sshd.common.channel

public Class LocalWindow

extends Window
Class Inheritance
Imports
java.io.IOException, .StreamCorruptedException, java.util.concurrent.atomic.AtomicLong, org.apache.sshd.common.PropertyResolver, org.apache.sshd.common.util.buffer.BufferUtils, org.apache.sshd.core.CoreModuleProperties

A Window that describes how much data this side is prepared to receive from the peer. Initialized when the channel is created. This side reduces the window by the amount of data received on reception; if it receives more data than allowed, it closes the channel. Once the data received has been processed, for instance, passed on, this side checks the current window size and if it is low, increases it and sends an SSH_MSG_CHANNEL_WINDOW_ADJUST message to the peer, who then is allowed to send more data again.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final AtomicLong
private final AbstractChannel
private long
Inherited from org.apache.sshd.common.channel.Window:
lock

Constructor Summary

AccessConstructor and Description
public
LocalWindow(AbstractChannel channel, boolean isClient)

Method Summary

Modifier and TypeMethod and Description
public void
public AbstractChannel
public void
init(PropertyResolver
{@PropertyResolver } to access properties
resolver
)

Initializes the LocalWindow with the packet and window sizes from the resolver.

public void
release(long
length of data read from the channel
len
)

Updates the window once data that has arrived in a channel has been read, making available room for the sender too send more data, sending a window adjust message if necessary.

Inherited from org.apache.sshd.common.channel.Window:
checkInitializedclosegetMaxSizegetPacketSizegetSizeinitisOpenlargerThantoStringupdateSize

Field Detail

adjustmentback to summary
private final AtomicLong adjustment
channelback to summary
private final AbstractChannel channel
releasedback to summary
private long released

Constructor Detail

LocalWindowback to summary
public LocalWindow(AbstractChannel channel, boolean isClient)

Method Detail

consumeback to summary
public void consume(long len) throws IOException

Implements abstract org.apache.sshd.common.channel.Window.consume.

Annotations
@Override
getChannelback to summary
public AbstractChannel getChannel()

Overrides org.apache.sshd.common.channel.Window.getChannel.

Implements org.apache.sshd.common.channel.ChannelHolder.getChannel.

Returns:AbstractChannel

Doc from org.apache.sshd.common.channel.ChannelHolder.getChannel.

The associated Channel instance

Annotations
@Override
initback to summary
public void init(PropertyResolver resolver)

Initializes the LocalWindow with the packet and window sizes from the resolver.

Parameters
resolver:PropertyResolver

{@PropertyResolver } to access properties

releaseback to summary
public void release(long len) throws IOException

Updates the window once data that has arrived in a channel has been read, making available room for the sender too send more data, sending a window adjust message if necessary.

Parameters
len:long

length of data read from the channel

Exceptions
IOException:
if sending a window adjust message fails