org.apache.sshd.common.channel
Class Window
java.lang.Object
org.apache.sshd.common.channel.Window
public class Window
- extends Object
A Window for a given channel.
Windows are used to not overflow the client or server when sending datas.
Both clients and servers have a local and remote window and won't send
anymore data until the window has been expanded. When the local window
is
- Author:
- Apache MINA SSHD Project
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Window
public Window(AbstractChannel channel,
Object lock,
boolean client,
boolean local)
getSize
public int getSize()
getMaxSize
public int getMaxSize()
getPacketSize
public int getPacketSize()
init
public void init(int size,
int packetSize)
expand
public void expand(int window)
consume
public void consume(int len)
consumeAndCheck
public void consumeAndCheck(int len)
throws IOException
- Throws:
IOException
check
public void check(int maxFree)
throws IOException
- Throws:
IOException
waitAndConsume
public void waitAndConsume(int len)
throws InterruptedException,
WindowClosedException
- Throws:
InterruptedException
WindowClosedException
waitForSpace
public int waitForSpace()
throws InterruptedException,
WindowClosedException
- Throws:
InterruptedException
WindowClosedException
notifyClosed
public void notifyClosed()
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.