@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } 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 (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } 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 (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } 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 (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } 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 (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); transportContext.setCompletionHandler(null); } 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 (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); } return ctx.getInvokeAction(); }
@Override @SuppressWarnings("unchecked") public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == TransportFilter.FlushEvent.TYPE) { final Connection connection = ctx.getConnection(); final FilterChainContext.TransportContext transportContext = ctx.getTransportContext(); if (transportContext.getCompletionHandler() != null) { throw new IllegalStateException("TransportContext CompletionHandler must be null"); } final CompletionHandler completionHandler = ((TransportFilter.FlushEvent) event).getCompletionHandler(); transport.getWriter(transportContext.isBlocking()).write(connection, Buffers.EMPTY_BUFFER, completionHandler); } return ctx.getInvokeAction(); }