/** * Unused. Will be removed in Tomcat 8.0.x * @deprecated */ @Deprecated public void cometInterest(NioChannel socket) { KeyAttachment att = (KeyAttachment)socket.getAttachment(false); add(socket,att.getCometOps()); if ( (att.getCometOps()&OP_CALLBACK) == OP_CALLBACK ) { nextExpiration = 0; //force the check for faster callback selector.wakeup(); } }
@Override protected void registerWriteInterest() throws IOException { NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false); if (att == null) { throw new IOException("Key must be cancelled"); } att.getPoller().add(socket, SelectionKey.OP_WRITE); }
public void cometInterest(NioChannel socket) { KeyAttachment att = (KeyAttachment)socket.getAttachment(false); add(socket,att.getCometOps()); if ( (att.getCometOps()&OP_CALLBACK) == OP_CALLBACK ) { nextExpiration = 0; //force the check for faster callback selector.wakeup(); } }
/** * Expected to be used by the handler once the processor is no longer * required. * * @param socket * @param processor * @param isSocketClosing Not used in HTTP * @param addToPoller */ @Override public void release(SocketWrapper<NioChannel> socket, Http11NioProcessor processor, boolean isSocketClosing, boolean addToPoller) { processor.recycle(); recycledProcessors.offer(processor); if (addToPoller) { socket.getSocket().getPoller().add(socket.getSocket()); } }
/** * Expected to be used by the handler once the processor is no longer * required. * * @param socket * @param processor * @param isSocketClosing Not used in HTTP * @param addToPoller */ @Override public void release(SocketWrapper<NioChannel> socket, Processor<NioChannel> processor, boolean isSocketClosing, boolean addToPoller) { processor.recycle(isSocketClosing); recycledProcessors.push(processor); if (addToPoller) { socket.getSocket().getPoller().add(socket.getSocket()); } }
@Override protected void longPoll(SocketWrapper<NioChannel> socket, Processor<NioChannel> processor) { connections.put(socket.getSocket(), processor); if (processor.isAsync()) { socket.setAsync(true); } else { // Either: // - this is comet request // - this is an upgraded connection // - the request line/headers have not been completely // read socket.getSocket().getPoller().add(socket.getSocket()); } }
/** * Expected to be used by the handler once the processor is no longer * required. */ @Override public void release(SocketWrapper<NioChannel> socket, AjpNioProcessor processor, boolean isSocketClosing, boolean addToPoller) { processor.recycle(isSocketClosing); recycledProcessors.offer(processor); if (addToPoller) { socket.getSocket().getPoller().add(socket.getSocket()); } }
@Override protected void longPoll(SocketWrapper<NioChannel> socket, Processor<NioChannel> processor) { if (processor.isAsync()) { socket.setAsync(true); } else { // Either: // - this is comet request // - this is an upgraded connection // - the request line/headers have not been completely // read socket.getSocket().getPoller().add(socket.getSocket()); } }
/** * Expected to be used by the handler once the processor is no longer * required. */ @Override public void release(SocketWrapper<NioChannel> socket, Processor<NioChannel> processor, boolean isSocketClosing, boolean addToPoller) { processor.recycle(isSocketClosing); recycledProcessors.offer(processor); if (addToPoller) { socket.getSocket().getPoller().add(socket.getSocket()); } }
@Override public void registerWriteInterest() { getPoller().add(getSocket(), SelectionKey.OP_WRITE); }
/** * Expected to be used by the handler once the processor is no longer * required. */ @Override public void release(SocketWrapper<NioChannel> socket, Processor<NioChannel> processor, boolean isSocketClosing, boolean addToPoller) { processor.recycle(isSocketClosing); recycledProcessors.push(processor); if (addToPoller) { socket.getSocket().getPoller().add(socket.getSocket()); } }
@Override public void registerReadInterest() { getPoller().add(getSocket(), SelectionKey.OP_READ); }
/** * Add specified socket and associated pool to the poller. The socket will * be added to a temporary array, and polled first after a maximum amount * of time equal to pollTime (in most cases, latency will be much lower, * however). * * @param socket to add to the poller */ public void add(final NioChannel socket) { add(socket,SelectionKey.OP_READ); }
public void cometInterest(NioChannel socket) { KeyAttachment att = (KeyAttachment)socket.getAttachment(false); add(socket,att.getCometOps()); if ( (att.getCometOps()&OP_CALLBACK) == OP_CALLBACK ) { nextExpiration = 0; //force the check for faster callback selector.wakeup(); } }
public void cometInterest(NioChannel socket) { KeyAttachment att = (KeyAttachment)socket.getAttachment(false); add(socket,att.getCometOps()); if ( (att.getCometOps()&OP_CALLBACK) == OP_CALLBACK ) { nextExpiration = 0; //force the check for faster callback selector.wakeup(); } }
/** * Add specified socket and associated pool to the poller. The socket will * be added to a temporary array, and polled first after a maximum amount * of time equal to pollTime (in most cases, latency will be much lower, * however). * * @param socket to add to the poller */ public void add(final NioChannel socket) { add(socket,SelectionKey.OP_READ); }
/** * Add specified socket and associated pool to the poller. The socket will * be added to a temporary array, and polled first after a maximum amount * of time equal to pollTime (in most cases, latency will be much lower, * however). * * @param socket to add to the poller */ public void add(final NioChannel socket) { add(socket,SelectionKey.OP_READ); }
public boolean dispatchForEvent(NioChannel socket, SocketStatus status, boolean dispatch) { if (dispatch && status == SocketStatus.OPEN_READ) { socket.getPoller().add(socket, OP_CALLBACK); } else { processSocket(socket,status,dispatch); } return true; }
/** * Add specified socket and associated pool to the poller. The socket will * be added to a temporary array, and polled first after a maximum amount * of time equal to pollTime (in most cases, latency will be much lower, * however). * * @param socket to add to the poller */ public void add(final NioChannel socket) { add(socket,SelectionKey.OP_READ); }
/** * Add specified socket and associated pool to the poller. The socket will * be added to a temporary array, and polled first after a maximum amount * of time equal to pollTime (in most cases, latency will be much lower, * however). * * @param socket to add to the poller */ public void add(final NioChannel socket) { add(socket,SelectionKey.OP_READ); }