void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
void setPeerStreamWindowSize(final int peerStreamWindowSize) throws Http2StreamException { synchronized (sessionLock) { final int delta = peerStreamWindowSize - this.peerStreamWindowSize; this.peerStreamWindowSize = peerStreamWindowSize; if (!streamsMap.isEmpty()) { for (final Http2Stream stream : streamsMap.values()) { if (stream.isClosed()) { continue; } stream.getOutputSink().onPeerWindowUpdate(delta); } } } }
stream.getOutputSink().writeDownStream(entireHttpPacket, ctx, transportContext.getCompletionHandler(),
stream.getOutputSink().writeDownStream(entireHttpPacket, ctx, transportContext.getCompletionHandler(),
/** * * @param ctx the current {@link FilterChainContext} * @param http2Session the {@link Http2Session} associated with this {@link HttpHeader} * @param httpHeader the out-going {@link HttpHeader} * @param entireHttpPacket the complete {@link HttpPacket} * * @throws IOException if an error occurs sending the packet */ @Override @SuppressWarnings("unchecked") protected void processOutgoingHttpHeader(final FilterChainContext ctx, final Http2Session http2Session, final HttpHeader httpHeader, final HttpPacket entireHttpPacket) throws IOException { final HttpResponsePacket response = (HttpResponsePacket) httpHeader; final Http2Stream stream = Http2Stream.getStreamFor(response); assert stream != null; if (!response.isCommitted()) { prepareOutgoingResponse(response); } final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); stream.getOutputSink().writeDownStream(entireHttpPacket, ctx, transportContext.getCompletionHandler(), transportContext.getMessageCloner()); }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }
private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException { WindowUpdateFrame updateFrame = (WindowUpdateFrame) frame; final int streamId = updateFrame.getStreamId(); final int delta = updateFrame.getWindowSizeIncrement(); updateFrame.recycle(); if (streamId == 0) { if (delta == 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } http2Session.getOutputSink().onPeerWindowUpdate(delta); } else { if (delta == 0) { throw new Http2StreamException(streamId, ErrorCode.PROTOCOL_ERROR, "Illegal WINDOW_UPDATE with a delta of 0."); } final Http2Stream stream = http2Session.getStream(streamId); //noinspection Duplicates if (stream != null) { stream.getOutputSink().onPeerWindowUpdate(delta); } else { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR); } } }