@Test public void closeWithoutBufferedFrameGivesNullBuffer() { framer.close(); verify(sink).deliverFrame(null, true, true, 0); verifyNoMoreInteractions(sink); assertEquals(0, allocator.allocCount); checkStats(); }
@Override public void close() { if (!isClosed()) { closed = true; if (buffer != null && buffer.readableBytes() == 0) { releaseBuffer(); } commitToSink(true, true); } }
MessageFramer implements Framer { @Override public void close() { if (!isClosed()) { closed = true; if (buffer != null && buffer.readableBytes() == 0) { releaseBuffer(); } commitToSink(true, true); } } }
MessageFramer implements Framer { @Override public void close() { if (!isClosed()) { closed = true; if (buffer != null && buffer.readableBytes() == 0) { releaseBuffer(); } commitToSink(true, true); } } MessageFramer(
      Sink sink, WritableBufferAllocator bufferAllocator, StatsTraceContext statsTraceCtx); }
MessageFramer implements Framer { @Override public void close() { if (!isClosed()) { closed = true; if (buffer != null && buffer.readableBytes() == 0) { releaseBuffer(); } commitToSink(true, true); } } MessageFramer(
      Sink sink, WritableBufferAllocator bufferAllocator, StatsTraceContext statsTraceCtx); @Override MessageFramer setCompressor(Compressor compressor); @Override MessageFramer setMessageCompression(boolean enable); @Override void setMaxOutboundMessageSize(int maxSize); @Override void writePayload(InputStream message); @Override void flush(); @Override boolean isClosed(); @Override void close(); @Override void dispose(); }
MessageFramer implements Framer { @Override public void close() { if (!isClosed()) { closed = true; if (buffer != null && buffer.readableBytes() == 0) { releaseBuffer(); } commitToSink(true, true); } } MessageFramer(
      Sink sink, WritableBufferAllocator bufferAllocator, StatsTraceContext statsTraceCtx); @Override MessageFramer setCompressor(Compressor compressor); @Override MessageFramer setMessageCompression(boolean enable); @Override void setMaxOutboundMessageSize(int maxSize); @Override void writePayload(InputStream message); @Override void flush(); @Override boolean isClosed(); @Override void close(); @Override void dispose();  }