add(new FlowController());
@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; } } }
add(new FlowController());
@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; } } }
add(new FlowController());
add(new FlowController());