/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
/** * TODO */ FutureImpl<Http2Session> terminateGracefully() { if (!isServer) { throw new IllegalStateException("Illegal use of graceful termination on client."); } final GoAwayFrame frame = setGoAwayLocally(ErrorCode.NO_ERROR, "Shutting Down", true); if (frame != null) { sessionClosed = Futures.createSafeFuture(); outputSink.writeDownStream(frame); } return sessionClosed; }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
protected void sendWindowUpdate(final int streamId, final int delta) { final WindowUpdateFrame f = WindowUpdateFrame.builder() .streamId(streamId) .windowSizeIncrement(delta) .build(); NetLogger.log(NetLogger.Context.TX, this, f); outputSink.writeDownStream(f); }
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); }