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...
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