@Override public void resume() throws Exception { try { endpoint.resume(); } catch (Exception ex) { CoyoteLogger.HTTP_NIO_LOGGER.errorResumingEndpoint(ex); throw ex; } CoyoteLogger.HTTP_NIO_LOGGER.resumeHttpConnector(getName()); }
public void start() throws Exception { if( this.domain != null ) { try { tpOname=new ObjectName (domain + ":" + "type=ThreadPool,name=" + getName()); Registry.getRegistry(null, null) .registerComponent(ep, tpOname, null ); } catch (Exception e) { log.error("Can't register threadpool" ); } rgOname=new ObjectName (domain + ":type=GlobalRequestProcessor,name=" + getName()); Registry.getRegistry(null, null).registerComponent ( cHandler.global, rgOname, null ); } try { ep.start(); } catch (Exception ex) { log.error(sm.getString("http11protocol.endpoint.starterror"), ex); throw ex; } if(log.isInfoEnabled()) log.info(sm.getString("http11protocol.start", getName())); }
@Override public void destroy() throws Exception { CoyoteLogger.HTTP_NIO_LOGGER.stopHttpConnector(getName()); if (canDestroy) { endpoint.destroy(); } else { CoyoteLogger.HTTP_NIO_LOGGER.cannotDestroyHttpProtocol(getName()); try { RequestInfo[] states = cHandler.global.getRequestProcessors(); for (int i = 0; i < states.length; i++) { if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) { // FIXME: Log RequestInfo content } } } catch (Exception ex) { CoyoteLogger.HTTP_NIO_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex); throw ex; } } if (org.apache.tomcat.util.Constants.ENABLE_MODELER) { if (tpOname != null) Registry.getRegistry(null, null).unregisterComponent(tpOname); if (rgOname != null) Registry.getRegistry(null, null).unregisterComponent(rgOname); } }
worker = ((Http11Protocol)handler).getName(); } else if (handler instanceof Http11NioProtocol) { worker = ((Http11NioProtocol)handler).getName(); } else if (handler instanceof Http11AprProtocol) { worker = ((Http11AprProtocol)handler).getName();
worker = ((Http11Protocol)handler).getName(); } else if (handler instanceof Http11NioProtocol) { worker = ((Http11NioProtocol)handler).getName(); } else if (handler instanceof Http11AprProtocol) { worker = ((Http11AprProtocol)handler).getName();
public void pause() throws Exception { try { ep.pause(); } catch (Exception ex) { log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex); throw ex; } if(log.isInfoEnabled()) log.info(sm.getString("http11protocol.pause", getName())); }
public void register(Http11NioProcessor processor) { if (proto.getDomain() != null) { synchronized (this) { try { registerCount.addAndGet(1); if (log.isDebugEnabled()) log.debug("Register ["+processor+"] count="+registerCount.get()); RequestInfo rp = processor.getRequest().getRequestProcessor(); rp.setGlobalProcessor(global); ObjectName rpName = new ObjectName (proto.getDomain() + ":type=RequestProcessor,worker=" + proto.getName() + ",name=HttpRequest" + count++); Registry.getRegistry(null, null).registerComponent(rp, rpName, null); rp.setRpName(rpName); } catch (Exception e) { log.warn("Error registering request"); } } } }
worker = ((Http11Protocol)handler).getName(); } else if (handler instanceof Http11NioProtocol) { worker = ((Http11NioProtocol)handler).getName(); } else if (handler instanceof Http11AprProtocol) { worker = ((Http11AprProtocol)handler).getName();
public void resume() throws Exception { try { ep.resume(); } catch (Exception ex) { log.error(sm.getString("http11protocol.endpoint.resumeerror"), ex); throw ex; } if(log.isInfoEnabled()) log.info(sm.getString("http11protocol.resume", getName())); }
CoyoteLogger.HTTP_NIO_LOGGER.pauseHttpConnector(getName());
worker = ((Http11Protocol)handler).getName(); } else if (handler instanceof Http11NioProtocol) { worker = ((Http11NioProtocol)handler).getName(); } else if (handler instanceof Http11AprProtocol) { worker = ((Http11AprProtocol)handler).getName();
worker = ((Http11Protocol)handler).getName(); } else if (handler instanceof Http11NioProtocol) { worker = ((Http11NioProtocol)handler).getName(); } else if (handler instanceof Http11AprProtocol) { worker = ((Http11AprProtocol)handler).getName();
final ObjectName rpName = new ObjectName (proto.getDomain() + ":type=RequestProcessor,worker=" + proto.getName() + ",name=HttpRequest" + count++); if (Constants.IS_SECURITY_ENABLED) { AccessController.doPrivileged(new PrivilegedAction<Void>() {
@Override public void start() throws Exception { if (org.apache.tomcat.util.Constants.ENABLE_MODELER) { if (this.domain != null) { try { tpOname = new ObjectName(domain + ":" + "type=ThreadPool,name=" + getJmxName()); Registry.getRegistry(null, null).registerComponent(endpoint, tpOname, null); } catch (Exception e) { CoyoteLogger.HTTP_NIO_LOGGER.errorRegisteringPool(e); } rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" + getJmxName()); Registry.getRegistry(null, null).registerComponent(cHandler.global, rgOname, null); } } try { endpoint.start(); } catch (Exception ex) { CoyoteLogger.HTTP_NIO_LOGGER.errorStartingEndpoint(ex); throw ex; } CoyoteLogger.HTTP_NIO_LOGGER.startHttpConnector(getName()); }
/** Start the protocol */ public void init() throws Exception { ep.setName(getName()); ep.setHandler(cHandler); //todo, determine if we even need these ep.getSocketProperties().setRxBufSize(Math.max(ep.getSocketProperties().getRxBufSize(),getMaxHttpHeaderSize())); ep.getSocketProperties().setTxBufSize(Math.max(ep.getSocketProperties().getTxBufSize(),getMaxHttpHeaderSize())); try { ep.init(); sslImplementation = new JSSEImplementation(); } catch (Exception ex) { log.error(sm.getString("http11protocol.endpoint.initerror"), ex); throw ex; } if(log.isInfoEnabled()) log.info(sm.getString("http11protocol.init", getName())); }
public void destroy() throws Exception { if(log.isInfoEnabled()) log.info(sm.getString("http11protocol.stop", getName())); ep.destroy(); if( tpOname!=null ) Registry.getRegistry(null, null).unregisterComponent(tpOname); if( rgOname != null ) Registry.getRegistry(null, null).unregisterComponent(rgOname); }