org.apache.sshd.common.channel
Class Window
java.lang.Object
org.apache.sshd.common.channel.Window
public class Window
- extends java.lang.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
|
Constructor Summary |
Window(AbstractChannel channel,
java.lang.Object lock,
boolean client,
boolean local)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Window
public Window(AbstractChannel channel,
java.lang.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 java.io.IOException
- Throws:
java.io.IOException
check
public void check(int maxFree)
throws java.io.IOException
- Throws:
java.io.IOException
waitAndConsume
public void waitAndConsume(int len)
throws java.lang.InterruptedException,
WindowClosedException
- Throws:
java.lang.InterruptedException
WindowClosedException
waitForSpace
public int waitForSpace()
throws java.lang.InterruptedException,
WindowClosedException
- Throws:
java.lang.InterruptedException
WindowClosedException
notifyClosed
public void notifyClosed()
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.