boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException { final Object message = ctx.getMessage(); if (message == null) { // If message == null - it means it's initiated by blocking ctx.read() call // we have to check Http2Stream associated input queue if there are any data we can return // otherwise block until input data is available final Http2Stream http2Stream = (Http2Stream) HttpContext.get(ctx).getContextStorage(); ctx.setMessage(http2Stream.pollInputData()); return true; } final HttpContent httpContent = (HttpContent) message; final HttpHeader httpHeader = httpContent.getHttpHeader(); // if the stream is assigned - it means we process HTTP/2.0 request // in the upstream (HTTP2 stream chain) return Http2Stream.getStreamFor(httpHeader) != null; }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (!Http2State.isHttp2(ctx.getConnection())) { return ctx.getInvokeAction(); } final Object type = event.type(); if (type == TransportFilter.FlushEvent.TYPE) { assert event instanceof TransportFilter.FlushEvent; final HttpContext httpContext = HttpContext.get(ctx); final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); final TransportFilter.FlushEvent flushEvent = (TransportFilter.FlushEvent) event; stream.outputSink.flush(flushEvent.getCompletionHandler()); return ctx.getStopAction(); } return ctx.getInvokeAction(); }
final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); stream.onProcessingComplete();
final Http2Stream stream = (Http2Stream) httpContext.getContextStorage(); stream.onProcessingComplete();