org.apache.sshd.common.channel
Class Window

java.lang.Object
  extended by 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

Constructor Summary
Window(AbstractChannel channel, Object lock, boolean client, boolean local)
           
 
Method Summary
 void check(int maxFree)
           
 void consume(int len)
           
 void consumeAndCheck(int len)
           
 void expand(int window)
           
 int getMaxSize()
           
 int getPacketSize()
           
 int getSize()
           
 void init(int size, int packetSize)
           
 void notifyClosed()
           
 void waitAndConsume(int len)
           
 int waitForSpace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Window

public Window(AbstractChannel channel,
              Object lock,
              boolean client,
              boolean local)
Method Detail

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.