Package io.netty.channel

Examples of io.netty.channel.ChannelPipeline.fireInboundBufferUpdated()


            // Write the bytes to the next inbound buffer and re-fire so the updated handlers in the pipeline can have a
            // go at it
            final ByteBuf nextInboundByteBuffer = ctx.nextInboundByteBuffer();
            nextInboundByteBuffer.writeBytes(in);
            pipeline.fireInboundBufferUpdated();
        }

        /**
         * Returns to the client that some error was encountered
         *
 
View Full Code Here


                closed = true;
            }
        } catch (Throwable t) {
            if (read) {
                read = false;
                pipeline.fireInboundBufferUpdated();
            }
            firedChannelReadSuspended = true;
            pipeline.fireChannelReadSuspended();
            pipeline.fireExceptionCaught(t);
            if (t instanceof IOException) {
View Full Code Here

            if (t instanceof IOException) {
                unsafe().close(unsafe().voidFuture());
            }
        } finally {
            if (read) {
                pipeline.fireInboundBufferUpdated();
            }
            if (!firedChannelReadSuspended) {
                pipeline.fireChannelReadSuspended();
            }
            if (closed && isOpen()) {
View Full Code Here

                final int capacity = byteBuf.capacity();
                final int maxCapacity = byteBuf.maxCapacity();
                if (capacity == maxCapacity) {
                    if (read) {
                        read = false;
                        pipeline.fireInboundBufferUpdated();
                        if (!byteBuf.isWritable()) {
                            throw new IllegalStateException(
                                    "an inbound handler whose buffer is full must consume at " +
                                            "least one byte.");
                        }
View Full Code Here

                }
            }
        } catch (Throwable t) {
            if (read) {
                read = false;
                pipeline.fireInboundBufferUpdated();
            }

            if (t instanceof IOException) {
                closed = true;
                pipeline.fireExceptionCaught(t);
View Full Code Here

                pipeline.fireExceptionCaught(t);
                unsafe().close(unsafe().voidFuture());
            }
        } finally {
            if (read) {
                pipeline.fireInboundBufferUpdated();
            }
            if (closed) {
                inputShutdown = true;
                if (isOpen()) {
                    if (Boolean.TRUE.equals(config().getOption(ChannelOption.ALLOW_HALF_CLOSURE))) {
View Full Code Here

        if (buf.isEmpty()) {
            acceptInProgress = true;
            return;
        }

        pipeline.fireInboundBufferUpdated();
        pipeline.fireChannelReadSuspended();
    }

    LocalChannel serve(final LocalChannel peer) {
        LocalChannel child = new LocalChannel(this, peer);
View Full Code Here

        if (eventLoop().inEventLoop()) {
            final ChannelPipeline pipeline = pipeline();
            pipeline.inboundMessageBuffer().add(child);
            if (acceptInProgress) {
                acceptInProgress = false;
                pipeline.fireInboundBufferUpdated();
                pipeline.fireChannelReadSuspended();
            }
        } else {
            eventLoop().execute(new Runnable() {
                @Override
View Full Code Here

        if (buf.isEmpty()) {
            readInProgress = true;
            return;
        }

        pipeline.fireInboundBufferUpdated();
        pipeline.fireChannelReadSuspended();
    }

    @Override
    protected void doFlushMessageBuffer(MessageBuf<Object> buf) throws Exception {
View Full Code Here

                    closed = true;
                }
            } catch (Throwable t) {
                if (read) {
                    read = false;
                    pipeline.fireInboundBufferUpdated();
                }

                if (!closed && channel.isOpen()) {
                    firedChannelReadSuspended = true;
                    pipeline.fireChannelReadSuspended();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.