예제 #1
0
  @Override
  public void outgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode) {
    ByteBuffer payload = frame.getPayload();
    int length = payload != null ? payload.remaining() : 0;
    if (OpCode.isControlFrame(frame.getOpCode()) || maxLength <= 0 || length <= maxLength) {
      nextOutgoingFrame(frame, callback, batchMode);
      return;
    }

    FrameEntry entry = new FrameEntry(frame, callback, batchMode);
    if (LOG.isDebugEnabled()) LOG.debug("Queuing {}", entry);
    entries.offer(entry);
    flusher.iterate();
  }
예제 #2
0
 @Override
 public void succeeded() {
   succeedEntries();
   super.succeeded();
 }
예제 #3
0
 @Override
 public void failed(Throwable e) {
   super.failed(e);
   _onError = e;
   _channel.getState().onWritePossible();
 }