protected Http2Stream newStream(final HttpRequestPacket request, final int streamId, final int refStreamId, final boolean exclusive, final int priority) { return new Http2Stream(this, request, streamId, refStreamId, exclusive, priority); }
@Override @Deprecated public boolean canWrite(int length) { return canWrite(); }
void onProcessingComplete() { isProcessingComplete = true; close(); // if (closeReasonUpdater.compareAndSet(this, null, // new CloseReason(CloseType.LOCALLY, null))) { // // inputBuffer.terminate(LOCAL_CLOSE_TERMINATION); // outputSink.close(); // // notifyCloseListeners(); // } }
DefaultOutputSink(final Http2Stream stream) { this.stream = stream; http2Session = stream.getHttp2Session(); availStreamWindowSize = new AtomicInteger(stream.getPeerWindowSize()); }
final HttpRequestPacket request = stream.getRequest(); stream.onRcvHeaders(isEOS); final HttpContent content; final Map<String,String> capture = ((NetLogger.isActive()) ? new LinkedHashMap<>() : null); if (stream.getInboundHeaderFramesCounter() == 1) { if (isEOS) { response.setExpectContent(false); stream.flushInputData();
final IOException error = stream.assertCanAcceptData(fin); if (error != null) { throw error; stream.offerInputData(data, fin);
void onOutputClosed() { if (completeFinalizationCounterUpdater.incrementAndGet(this) == 2) { closeStream(); } }
/** * {@inheritDoc} * @deprecated please use {@link #close()} with the following {@link GrizzlyFuture#addCompletionHandler(org.glassfish.grizzly.CompletionHandler)} call */ @Override public void close(final CompletionHandler<Closeable> completionHandler) { close0(completionHandler, CloseType.LOCALLY, null, true); }
@Override public void onClosed(final Closeable closeable, final CloseType type) throws IOException { NetLogger.logClose(Http2Session.this); final boolean isClosing; synchronized (sessionLock) { isClosing = !isClosed(); if (isClosing) { closeFlag = type; } } if (isClosing) { for (Http2Stream stream : streamsMap.values()) { stream.closedRemotely(); } } } }
@SuppressWarnings("Duplicates") @Override public GrizzlyFuture<CloseReason> closeFuture() { if (closeFuture == null) { synchronized (this) { if (closeFuture == null) { final CloseReason cr = closeReason; if (cr == null) { final FutureImpl<CloseReason> f = Futures.createSafeFuture(); addCloseListener(new org.glassfish.grizzly.CloseListener() { @Override public void onClosed(Closeable closeable, @SuppressWarnings("deprecation") ICloseType type) throws IOException { final CloseReason cr = closeReason; assert cr != null; f.result(cr); } }); closeFuture = f; } else { closeFuture = Futures.createReadyFuture(cr); } } } } return closeFuture; }
DefaultInputBuffer(final Http2Stream stream) { this.stream = stream; http2Session = stream.getHttp2Session(); }
http2Session.streamsToFlushInput; for (Http2Stream streamsToFlush : streamsToFlushInput) { streamsToFlush.flushInputData();
final HttpRequestPacket request = stream.getRequest(); stream.onRcvHeaders(isEOS); final HttpContent content; final Map<String,String> capture = ((NetLogger.isActive()) ? new LinkedHashMap<>() : null); if (stream.getInboundHeaderFramesCounter() == 1) { if (isEOS) { response.setExpectContent(false); stream.flushInputData();
DefaultOutputSink(final Http2Stream stream) { this.stream = stream; http2Session = stream.getHttp2Session(); availStreamWindowSize = new AtomicInteger(stream.getPeerWindowSize()); }
final IOException error = stream.assertCanAcceptData(fin); if (error != null) { throw error; stream.offerInputData(data, fin);
void onInputClosed() { if (completeFinalizationCounterUpdater.incrementAndGet(this) == 2) { closeStream(); } }
/** * {@inheritDoc} * @deprecated please use {@link #close()} with the following {@link GrizzlyFuture#addCompletionHandler(org.glassfish.grizzly.CompletionHandler)} call */ @Override public void close(final CompletionHandler<Closeable> completionHandler) { close0(completionHandler, CloseType.LOCALLY, null, true); }
@Override public void onClosed(final Closeable closeable, final CloseType type) throws IOException { NetLogger.logClose(Http2Session.this); final boolean isClosing; synchronized (sessionLock) { isClosing = !isClosed(); if (isClosing) { closeFlag = type; } } if (isClosing) { for (Http2Stream stream : streamsMap.values()) { stream.closedRemotely(); } } } }
@SuppressWarnings("Duplicates") @Override public GrizzlyFuture<CloseReason> closeFuture() { if (closeFuture == null) { synchronized (this) { if (closeFuture == null) { final CloseReason cr = closeReason; if (cr == null) { final FutureImpl<CloseReason> f = Futures.createSafeFuture(); addCloseListener(new org.glassfish.grizzly.CloseListener() { @Override public void onClosed(Closeable closeable, @SuppressWarnings("deprecation") ICloseType type) throws IOException { final CloseReason cr = closeReason; assert cr != null; f.result(cr); } }); closeFuture = f; } else { closeFuture = Futures.createReadyFuture(cr); } } } } return closeFuture; }
final HttpRequestPacket request = stream.getRequest(); stream.onRcvHeaders(isEOS); final HttpContent content; final Map<String,String> capture = ((NetLogger.isActive()) ? new LinkedHashMap<>() : null); if (stream.getInboundHeaderFramesCounter() == 1) { if (isEOS) { response.setExpectContent(false); stream.flushInputData();