private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void flushToConnectionOutputSink( final List<Http2Frame> headerFrames, final Buffer data, final CompletionHandler<WriteResult> completionHandler, final MessageCloner<Buffer> messageCloner, final boolean isLast) { http2Session.getOutputSink().writeDataDownStream(stream, headerFrames, data, completionHandler, messageCloner, isLast); if (isLast) { terminate(OUT_FIN_TERMINATION); } }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException { if (frame.getStreamId() != 0) { throw new Http2SessionException(ErrorCode.PROTOCOL_ERROR, "PING frame with non-zero stream ID."); } if (frame.getLength() != 8) { throw new Http2SessionException(ErrorCode.FRAME_SIZE_ERROR, "PING frame with invalid length."); } PingFrame pingFrame = (PingFrame) frame; if (pingFrame.isAckSet()) { return; } // Send the same ping message back, but set the ack flag pingFrame.setFlag(PingFrame.ACK_FLAG); http2Session.getOutputSink().writeDownStream(pingFrame); }
@Override @SuppressWarnings("unchecked") public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Http2State http2State = Http2State.get(ctx.getConnection()); if (http2State == null || http2State.isNeverHttp2()) { return ctx.getInvokeAction(); } final Object message = ctx.getMessage(); final Http2Session http2Session = obtainHttp2Session(ctx, false); if (http2Session.isHttp2OutputEnabled() && HttpPacket.isHttp(message)) { // Get HttpPacket final HttpPacket httpPacket = ctx.getMessage(); final HttpHeader httpHeader = httpPacket.getHttpHeader(); processOutgoingHttpHeader(ctx, http2Session, httpHeader, httpPacket); } else { final TransportContext transportContext = ctx.getTransportContext(); http2Session.getOutputSink().writeDownStream(message, transportContext.getCompletionHandler(), transportContext.getMessageCloner()); } return ctx.getStopAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleWrite(final FilterChainContext ctx) throws IOException { final Http2State http2State = Http2State.get(ctx.getConnection()); if (http2State == null || http2State.isNeverHttp2()) { return ctx.getInvokeAction(); } final Object message = ctx.getMessage(); final Http2Session http2Session = obtainHttp2Session(ctx, false); if (http2Session.isHttp2OutputEnabled() && HttpPacket.isHttp(message)) { // Get HttpPacket final HttpPacket httpPacket = ctx.getMessage(); final HttpHeader httpHeader = httpPacket.getHttpHeader(); processOutgoingHttpHeader(ctx, http2Session, httpHeader, httpPacket); } else { final TransportContext transportContext = ctx.getTransportContext(); http2Session.getOutputSink().writeDownStream(message, transportContext.getCompletionHandler(), transportContext.getMessageCloner()); } return ctx.getStopAction(); }