public void flush(NextFilter nextFilter, IoSession session) { Queue<Object> messageQueue = getMessageQueue(); while (!messageQueue.isEmpty()) { nextFilter.messageReceived(session, messageQueue.poll()); } } }
/** * Return a reference to the decoder callback. If it's not already created * and stored into the session, we create a new instance. */ private ProtocolDecoderOutput getDecoderOut(IoSession session, NextFilter nextFilter) { ProtocolDecoderOutput out = (ProtocolDecoderOutput) session.getAttribute(DECODER_OUT); if (out == null) { // Create a new instance, and stores it into the session out = new ProtocolDecoderOutputImpl(); session.setAttribute(DECODER_OUT, out); } return out; }
/** * Return a reference to the decoder callback. If it's not already created * and stored into the session, we create a new instance. */ private ProtocolDecoderOutput getDecoderOut(IoSession session, NextFilter nextFilter) { ProtocolDecoderOutput out = (ProtocolDecoderOutput) session.getAttribute(DECODER_OUT); if (out == null) { // Create a new instance, and stores it into the session out = new ProtocolDecoderOutputImpl(); session.setAttribute(DECODER_OUT, out); } return out; }
/** * Return a reference to the decoder callback. If it's not already created * and stored into the session, we create a new instance. */ private ProtocolDecoderOutput getDecoderOut(IoSession session, NextFilter nextFilter) { ProtocolDecoderOutput out = (ProtocolDecoderOutput) session.getAttribute(DECODER_OUT); if (out == null) { // Create a new instance, and stores it into the session out = new ProtocolDecoderOutputImpl(); session.setAttribute(DECODER_OUT, out); } return out; }
/** * {@inheritDoc} */ @Override public void flush(NextFilter nextFilter, IoSession session) { Queue<Object> messageQueue = getMessageQueue(); while (!messageQueue.isEmpty()) { nextFilter.messageReceived(session, messageQueue.poll()); } } }
/** * {@inheritDoc} */ @Override public void flush(NextFilter nextFilter, IoSession session) { Queue<Object> messageQueue = getMessageQueue(); while (!messageQueue.isEmpty()) { nextFilter.messageReceived(session, messageQueue.poll()); } } }