IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptHeader(final boolean fin) { final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received HEADER frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received HEADER frame on " + state + " stream.")); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
IOException assertCanAcceptData(final boolean fin) { if (isPushStream() && isLocallyInitiatedStream()) { return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "Data frame received on a push-stream"); } final Http2Stream.State state = getState(); if (state == State.HALF_CLOSED_REMOTE || getState() == State.CLOSED) { close0(null, CloseType.LOCALLY, new IOException("Received DATA frame on " + state + " stream."), false); return ((fin) ? new Http2SessionException(ErrorCode.STREAM_CLOSED) : new Http2StreamException(getId(), ErrorCode.STREAM_CLOSED, "Received DATA frame on " + state + " stream.")); } if (inboundHeaderFramesCounter != 1) { // we accept data only if we received one HeadersFrame close0(null, CloseType.LOCALLY, new IOException("DATA frame came before HEADERS frame."), false); return new Http2StreamException(getId(), ErrorCode.PROTOCOL_ERROR, "DATA frame came before HEADERS frame."); } return null; }
final Http2Stream.State state = stream.getState(); if (state == Http2Stream.State.HALF_CLOSED_REMOTE || state == Http2Stream.State.CLOSED) { if (headersFrame.isEndStream()) {
final Http2Stream.State state = stream.getState(); if (state == Http2Stream.State.HALF_CLOSED_REMOTE || state == Http2Stream.State.CLOSED) { if (headersFrame.isEndStream()) {