@Override public boolean isDebugEnabled() { return log.isDebugEnabled(); }
@Override public boolean isDebugEnabled() { return log.isDebugEnabled(); }
public boolean isDebugEnabled() { return log.isDebugEnabled(); }
result = sslEngine.wrap(hsBuffer, writeBuf); initialHSStatus = result.getHandshakeStatus(); if(log.isDebugEnabled()) { log.debug("session {} handshake response, init: {} | ret: {} | complete: {}", session.getSessionId(), initialHSStatus, result.getStatus(), initialHSComplete);
private void writingCompletedCallback(Callback callback, long currentWritenBytes) { lastWrittenTime = Millisecond100Clock.currentTimeMillis(); if (currentWritenBytes < 0) { if (log.isDebugEnabled()) { log.debug("the session {} output is closed, {}", getSessionId(), currentWritenBytes); } closeNow(); return; } if (log.isDebugEnabled()) { log.debug("the session {} writes {} bytes", getSessionId(), currentWritenBytes); } writtenBytes += currentWritenBytes; callback.succeeded(); outputLock.lock(); try { OutputEntry<?> obj = outputBuffer.poll(); if (obj != null) { _write(obj); } else { isWriting = false; } } finally { outputLock.unlock(); } }
result = sslEngine.unwrap(inNetBuffer, requestBuffer); initialHSStatus = result.getHandshakeStatus(); if(log.isDebugEnabled()) { log.debug("session {} handshake receives data, init: {} | ret: {} | complete: {} ", session.getSessionId(), initialHSStatus, result.getStatus(), initialHSComplete);
throw new IllegalStateException("The initial handshake is not complete."); if(log.isDebugEnabled()) { log.debug("SSL read current session {} status -> {}", session.getSessionId(), session.isOpen());
@Override public void failed(Throwable t, AsynchronousTcpSession session) { if (t instanceof InterruptedByTimeoutException) { if (log.isDebugEnabled()) { log.debug("the session {} reading data is timeout.", getSessionId()); } } else { log.error("the session {} read data is failed", t, session.getSessionId()); } session.closeNow(); } });
private void writingFailedCallback(Callback callback, Throwable t) { if (t instanceof InterruptedByTimeoutException) { if (log.isDebugEnabled()) { log.debug("the session {} writing data is timeout.", getSessionId()); } } else { log.error("the session {} writes data is failed", t, getSessionId()); } closeNow(); callback.failed(t); }
@Override public void completed(Integer currentReadBytes, AsynchronousTcpSession session) { session.lastReadTime = Millisecond100Clock.currentTimeMillis(); if (currentReadBytes < 0) { if (log.isDebugEnabled()) { log.debug("the session {} input is closed, {}", session.getSessionId(), currentReadBytes); } session.closeNow(); return; } if (log.isDebugEnabled()) { log.debug("the session {} read {} bytes", session.getSessionId(), currentReadBytes); } // Update the predictor. session.bufferSizePredictor.previousReceivedBufferSize(currentReadBytes); session.readBytes += currentReadBytes; buf.flip(); try { config.getDecoder().decode(buf, session); } catch (Throwable t) { eventManager.executeExceptionTask(session, t); } finally { _read(); } }
@Override public void closeNow() { if (!isOpen()) return; closeTime = Millisecond100Clock.currentTimeMillis(); try { socketChannel.close(); } catch (AsynchronousCloseException e) { if (log.isDebugEnabled()) log.debug("the session {} asynchronously closed", sessionId); } catch (IOException e) { log.error("the session {} close error", e, sessionId); } state = CLOSE; eventManager.executeCloseTask(this); }
final ByteBuffer buf = ByteBuffer.allocate(bufferSize); if (log.isDebugEnabled()) { log.debug("the session {} buffer size is {}", getSessionId(), bufferSize);
case BYTE_BUFFER: ByteBufferOutputEntry byteBufferOutputEntry = (ByteBufferOutputEntry) entry; if (log.isDebugEnabled()) { log.debug("the session {} will write buffer {}", getSessionId(), byteBufferOutputEntry.getData().remaining());