/** * Expected to be used by the Poller to release resources on socket * close, errors etc. */ @Override public void release(SocketChannel socket) { if (log.isDebugEnabled()) log.debug("Iterating through our connections to release a socket channel:"+socket); boolean released = false; Iterator<java.util.Map.Entry<NioChannel, AjpNioProcessor>> it = connections.entrySet().iterator(); while (it.hasNext()) { java.util.Map.Entry<NioChannel, AjpNioProcessor> entry = it.next(); if (entry.getKey().getIOChannel()==socket) { it.remove(); AjpNioProcessor result = entry.getValue(); result.recycle(true); unregister(result); released = true; break; } } if (log.isDebugEnabled()) log.debug("Done iterating through our connections to release a socket channel:"+socket +" released:"+released); }
/** * Expected to be used by the Poller to release resources on socket * close, errors etc. */ @Override public void release(SocketChannel socket) { if (log.isDebugEnabled()) log.debug(sm.getString("ajpnioprotocol.releaseStart", socket)); boolean released = false; Iterator<java.util.Map.Entry<NioChannel, Processor<NioChannel>>> it = connections.entrySet().iterator(); while (it.hasNext()) { java.util.Map.Entry<NioChannel, Processor<NioChannel>> entry = it.next(); if (entry.getKey().getIOChannel()==socket) { it.remove(); Processor<NioChannel> result = entry.getValue(); result.recycle(true); unregister(result); released = true; break; } } if (log.isDebugEnabled()) log.debug(sm.getString("ajpnioprotocol.releaseEnd", socket, Boolean.valueOf(released))); }
/** * Expected to be used by the Poller to release resources on socket * close, errors etc. */ @Override public void release(SocketChannel socket) { if (log.isDebugEnabled()) log.debug("Iterating through our connections to release a socket channel:"+socket); boolean released = false; Iterator<java.util.Map.Entry<NioChannel, Processor<NioChannel>>> it = connections.entrySet().iterator(); while (it.hasNext()) { java.util.Map.Entry<NioChannel, Processor<NioChannel>> entry = it.next(); if (entry.getKey().getIOChannel()==socket) { it.remove(); Processor<NioChannel> result = entry.getValue(); result.recycle(true); unregister(result); released = true; break; } } if (log.isDebugEnabled()) log.debug("Done iterating through our connections to release a socket channel:"+socket +" released:"+released); }
public AjpNioProtocol() { endpoint = new NioEndpoint(); cHandler = new AjpConnectionHandler(this); ((NioEndpoint) endpoint).setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); // AJP does not use Send File ((NioEndpoint) endpoint).setUseSendfile(false); }
public AjpNioProtocol() { endpoint = new NioEndpoint(); cHandler = new AjpConnectionHandler(this); ((NioEndpoint) endpoint).setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); // AJP does not use Send File ((NioEndpoint) endpoint).setUseSendfile(false); }
@Override protected AjpNioProcessor createProcessor() { AjpNioProcessor processor = new AjpNioProcessor(proto.packetSize, (NioEndpoint)proto.endpoint); processor.setAdapter(proto.getAdapter()); processor.setTomcatAuthentication(proto.tomcatAuthentication); processor.setRequiredSecret(proto.requiredSecret); processor.setClientCertProvider(proto.getClientCertProvider()); register(processor); return processor; }
public AjpNioProtocol() { endpoint = new NioEndpoint(); cHandler = new AjpConnectionHandler(this); ((NioEndpoint) endpoint).setHandler(cHandler); setSoLinger(Constants.DEFAULT_CONNECTION_LINGER); setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT); setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY); // AJP does not use Send File ((NioEndpoint) endpoint).setUseSendfile(false); }
@Override protected AjpNioProcessor createProcessor() { AjpNioProcessor processor = new AjpNioProcessor(proto.packetSize, (NioEndpoint)proto.endpoint); processor.setAdapter(proto.adapter); processor.setTomcatAuthentication(proto.tomcatAuthentication); processor.setRequiredSecret(proto.requiredSecret); processor.setClientCertProvider(proto.getClientCertProvider()); register(processor); return processor; } }
@Override protected AjpNioProcessor createProcessor() { AjpNioProcessor processor = new AjpNioProcessor(proto.packetSize, (NioEndpoint)proto.endpoint); processor.setAdapter(proto.adapter); processor.setTomcatAuthentication(proto.tomcatAuthentication); processor.setRequiredSecret(proto.requiredSecret); processor.setClientCertProvider(proto.getClientCertProvider()); register(processor); return processor; } }