@Override public void failed(Throwable failure) { // Forward failure on the first failure. while (true) { int current = count.get(); // Already completed ? if (current == 0) return; if (count.compareAndSet(current, 0)) { super.failed(failure); return; } } }
@Override public void succeeded() { // Forward success on the last success. while (true) { int current = count.get(); // Already completed ? if (current == 0) return; if (count.compareAndSet(current, current - 1)) { if (current == 1) super.succeeded(); return; } } }
@Override public void succeeded() { getStream(frame, MessageFrame::isEndStream).ifPresent(stream -> { if (log.isDebugEnabled()) { log.debug("The stream {} sends message frame success.", stream.toString()); } Stream.State next = getNextState(stream.getState(), StreamStateTransferMap.Op.SEND_ES); stream.setState(next); if (next == Stream.State.CLOSED) { notifyCloseStream(stream); } }); super.succeeded(); FlexSession.this.succeeded(); }
@Override public void succeeded() { // Forward success on the last success. while (true) { int current = count.get(); // Already completed ? if (current == 0) return; if (count.compareAndSet(current, current - 1)) { if (current == 1) super.succeeded(); return; } } }
@Override public void succeeded() { // Forward success on the last success. while (true) { int current = count.get(); // Already completed ? if (current == 0) return; if (count.compareAndSet(current, current - 1)) { if (current == 1) super.succeeded(); return; } } }
@Override public void failed(Throwable failure) { // Forward failure on the first failure. while (true) { int current = count.get(); // Already completed ? if (current == 0) return; if (count.compareAndSet(current, 0)) { super.failed(failure); return; } } }
@Override public void succeeded() { getStream(frame, MessageFrame::isEndStream).ifPresent(stream -> { if (log.isDebugEnabled()) { log.debug("The stream {} sends message frame success.", stream.toString()); } Stream.State next = getNextState(stream.getState(), StreamStateTransferMap.Op.SEND_ES); stream.setState(next); if (next == Stream.State.CLOSED) { notifyCloseStream(stream); } }); super.succeeded(); FlexSession.this.succeeded(); }
@Override public void failed(Throwable failure) { // Forward failure on the first failure. while (true) { int current = count.get(); // Already completed ? if (current == 0) return; if (count.compareAndSet(current, 0)) { super.failed(failure); return; } } }
@Override public void failed(Throwable x) { super.failed(x); FlexSession.this.failed(x); } };
@Override public void failed(Throwable x) { if (stream != null) { stream.close(); stream.getSession().removeStream(stream); } super.failed(x); }
@Override public void failed(Throwable x) { if (stream != null) { stream.close(); stream.getSession().removeStream(stream); } super.failed(x); }
@Override public void failed(Throwable x) { super.failed(x); FlexSession.this.failed(x); } };