/** * @see IoSession#suspendRead() */ public void suspendRead() { wrappedSession.suspendRead(); }
protected void suspendIncoming(IoSession session) { ++suspendCount; if (suspendCount == 1) { session.suspendRead(); } }
@Override protected void suspendRead1() { super.suspendRead2(); IoSession readSession = this.readSession.get(); if (readSession != null) { readSession.suspendRead(); } }
@Override protected void suspendRead1() { suspendRead2(); IoSession parent = this.parent.get(); if (parent != null) { parent.suspendRead(); } }
public void suspend() { session.suspendRead(); session.suspendWrite(); }
@Override public void messageReceived(NextFilter nextFilter, IoSession session, Object message) throws Exception { if (requestsCompleted.get() == responsesCompleted.get()) { super.messageReceived(nextFilter, session, message); } else { if (messageQueue.isEmpty()) { if (logger.isTraceEnabled()) { logger.trace(format("[%s#%s] Suspending reads for HTTP pipelined request", HttpProtocol.NAME, session.getId())); } session.suspendRead(); } messageQueue.add(message); } }
private static void suspendReads(Session qfSession, int queueUpperWatermark) { final IoSession ioSession = lookupIoSession(qfSession); if (ioSession != null && !ioSession.isReadSuspended()) { ioSession.suspendRead(); qfSession.getLog().onEvent(format(UPPER_WATERMARK_FMT, queueUpperWatermark)); } }
private static void suspendReads(Session qfSession, int queueUpperWatermark) { final IoSession ioSession = lookupIoSession(qfSession); if (ioSession != null && !ioSession.isReadSuspended()) { ioSession.suspendRead(); qfSession.getLog().onEvent(format(UPPER_WATERMARK_FMT, queueUpperWatermark)); } }
@Override protected final void callNextMessageReceived(final Entry entry, final IoSession session, final Object message) { if (aligned()) { // Note: no suspendRead / resumeRead coordination necessary when thread-aligned super.callNextMessageReceived(entry, session, message); } else { // Note: reads will be resumed after completion of scheduled callNextMessageReceived session.suspendRead(); execute(new Runnable() { @Override public void run() { // handle re-alignment race using this instead of super DefaultIoFilterChainEx.this.callNextMessageReceived(entry, session, message); // Note: reads were suspended before scheduling callNextMessageReceived // if suspendRead was called during callNextNessageReceived // then calling resumeRead below will not actually resume reads // due to internal read suspend counter session.resumeRead(); } }); } }
sourceSession.suspendRead();
if (cause instanceof WSMessageTooLongException) { closeMessage = WsCloseMessage.MESSAGE_TOO_LONG_ERROR; session.suspendRead(); } else if(cause instanceof ProtocolDecoderException) { closeMessage = WsCloseMessage.PROTOCOL_ERROR;
private void addSslFilter() { minaSession.suspendRead(); minaSession.suspendWrite(); SslFilter filter = new SslFilter(getServerRuntimeContext().getSslContext()); filter.setUseClientMode(clientTLS); minaSession.getFilterChain().addFirst("sslFilter", filter); if(!clientTLS) { minaSession.setAttribute(SslFilter.DISABLE_ENCRYPTION_ONCE, Boolean.TRUE); } minaSession.setAttribute(SslFilter.USE_NOTIFICATION, Boolean.TRUE); minaSession.resumeWrite(); minaSession.resumeRead(); }