public int drained() { int drained = link.drained(); getSession().getConnectionImpl().flush(); return drained; }
@Override public void onUnhandled(Event event) { int window = this.window; Link link = event.getLink(); switch(event.getType()) { case LINK_LOCAL_OPEN: case LINK_REMOTE_OPEN: case LINK_FLOW: case DELIVERY: if (link instanceof Receiver) { this.drained += link.drained(); if (this.drained == 0) { topup((Receiver)link, window); } } break; default: break; } } }
@Override public void onUnhandled(Event event) { int window = this.window; Link link = event.getLink(); switch(event.getType()) { case LINK_LOCAL_OPEN: case LINK_REMOTE_OPEN: case LINK_FLOW: case DELIVERY: if (link instanceof Receiver) { this.drained += link.drained(); if (this.drained == 0) { topup((Receiver)link, window); } } break; default: break; } } }