[Tomcat] Chapter 3: Class relations in Tomcat

First of all, we must make it clear that the tomcat container mentioned earlier is actually a component

  • These containers are organized in combination
  • The combined container becomes a child container of the current container, for example, Host is a child container of Engine

1. Overall architecture class diagram

  • Interface: Server, Service, Container, Engine...
  • Implementation class: StandardServer, StandardService, StandardEngine...
    Insert picture description here
    Note: Conncter is class (common class), Protocol is enum (enumeration class), Endpoint is abstract class (abstract class)

2 Life cycle management class diagram

  • Both Container and Connector components inherit LifeCycleBase instead of directly implementing LifeCycle
  • And LifeCycleBase is an abstract class, it implements init, start and other methods
  • Through the template mode , all containers only need to implement initInternal, startInternal methods

fig11.png

3. General Class Diagram

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43935927/article/details/108640306