@Override public Connector getProxyConnector() { return this.registry.getProxyConnectorProvider().createProxyConnector(this.registry.getConnectorFactory(), this.engine); }
public TomcatEventHandlerAdapter(ContainerEventHandler eventHandler, Server server, Connector connector) { this(eventHandler, new SimpleServerProvider(server), new SimpleProxyConnectorProvider(connector)); }
@Override public Connector createConnector(org.apache.catalina.connector.Connector connector) { return new TomcatConnector(connector); } }
public TomcatEventHandlerAdapter(ContainerEventHandler eventHandler, TomcatConnectorConfiguration connectorConfiguration) { this(eventHandler, new JMXServerProvider(ManagementFactory.getPlatformMBeanServer(), toObjectName("Catalina:type=Server")), new ConfigurableProxyConnectorProvider(connectorConfiguration)); }
@Override public Host findHost(String name) { org.apache.catalina.Host host = (org.apache.catalina.Host) this.engine.findChild(name); return (host != null) ? this.registry.getHostFactory().createHost(this.registry, host, this) : null; }
@Override public Context findContext(String path) { org.apache.catalina.Context context = (org.apache.catalina.Context) this.host.findChild(path); return (context != null) ? TomcatHost.this.registry.getContextFactory().createContext(context, this) : null; }
/** * initialize server stuff: in jbossweb-2.1.x the server can't be destroyed so you could start (restart) one that needs * initializations... */ protected void init(Server server) { this.eventHandler.init(this.factory.createServer(server)); this.addListeners(server); }
@Override public Connector createProxyConnector(ConnectorFactory factory, Engine engine) { return factory.createConnector(this.connector); } }
protected RequestGroupInfo getRequestGroupInfo() { Object connectionHandler = this.getConnectionHandler(); if (connectionHandler == null) return null; return this.getRequestGroupInfo(connectionHandler); }
@Override public LifecycleListener createListener(ContainerEventHandler handler, TomcatConnectorConfiguration connectorConfiguration) { return new TomcatEventHandlerAdapter(handler, connectorConfiguration); } }
@Override public Server createServer(TomcatFactoryRegistry registry, org.apache.catalina.Server server) { return new TomcatServer(registry, server); } }
@Override public Engine createEngine(TomcatFactoryRegistry registry, org.apache.catalina.Engine engine, Server server) { return new TomcatEngine(registry, engine, server); } }
@Override public Context createContext(org.apache.catalina.Context context, Host host) { return new TomcatContext(context, host); } }
@Override public Host createHost(TomcatFactoryRegistry registry, org.apache.catalina.Host host, Engine engine) { return new TomcatHost(registry, host, engine); } }
@Override public Server createServer(org.apache.catalina.Server server) { return this.serverFactory.createServer(this, server); }
public ModClusterListener() { ModClusterService service = new ModClusterService(this, this); this.service = service; this.listener = ServiceLoaderTomcatFactory.load(LifecycleListenerFactory.class, TomcatEventHandlerAdapterFactory.class).createListener(service, this); }
@Override public Valve createValve(ServletRequestListener listener) { return new RequestListenerValve(listener); } });
@Override public Server getServer() { if (this.server != null) return this.server; this.server = this.findServer(); return this.server; }
public ServiceLoaderTomcatFactory(ProxyConnectorProvider provider) { this.serverFactory = load(ServerFactory.class, TomcatServerFactory.class); this.engineFactory = load(EngineFactory.class, TomcatEngineFactory.class); this.hostFactory = load(HostFactory.class, TomcatHostFactory.class); this.contextFactory = load(ContextFactory.class, TomcatContextFactory.class); this.connectorFactory = load(ConnectorFactory.class, TomcatConnectorFactory.class); this.provider = provider; }
@Override public void invoke(Request request, Response response) throws IOException, ServletException { this.event(request, response, null); }