tomcat源码编译: https://blog.csdn.net/qq_35262405/article/details/101780644
Tomcat
init
1 |
|
Server的初始化
initInternal
1 |
|
Service初始化
initInternal
1 |
|
Engine初始化
initInternal
1 |
|
mapperListener初始化
initInternal
1 |
|
Connector初始化
initInternal
1 | protected void initInternal() throws LifecycleException { |
protocolHandler初始化
1 |
|
endpoint初始化
1 |
|
bind
1 |
|
NioBlockingSelector
1 |
|
BlockPoller
1 | protected static class BlockPoller extends Thread { |
run
1 | public void run() { |
start
1 |
|
Server的启动
startInternal
1 |
|
globalNamingResources启动
1 |
|
Service启动
1 |
|
Engine启动
1 |
|
threadStart
1 |
|
pipeline启动
1 |
|
MapperListener启动
1 |
|
findDefaultHost
1 |
|
addListeners
1 | private void addListeners(Container container) { |
registerHost
1 | private void registerHost(Host host) { |
registerContext
1 | private void registerContext(Context context) { |
prepareWrapperMappingInfo
1 | private void prepareWrapperMappingInfo(Context context, Wrapper wrapper, |
Connector启动
1 |
|
protocolHandler启动
1 |
|
AsyncTimeout
1 |
|
endpoint启动
1 | public final void start() throws Exception { |
startInternal
1 | public void startInternal() throws Exception { |
createExecutor
1 | public void createExecutor() { |
initializeConnectionLatch
1 | protected LimitLatch initializeConnectionLatch() { |
Poller
1 |
|
run
1 |
|
processKey
1 | protected void processKey(SelectionKey sk, NioSocketWrapper attachment) { |
startAcceptorThreads
1 | protected final void startAcceptorThreads() { |
Acceptor
1 | protected class Acceptor extends AbstractEndpoint.Acceptor { |
setSocketOptions
1 | protected boolean setSocketOptions(SocketChannel socket) { |
Poller注册
1 | public void register(final NioChannel socket) { |
PollerEvent
1 | public static class PollerEvent implements Runnable { |
- 本文作者: 忘忧症
- 本文链接: https://NepenthesZGW.github.io/2020/09/02/web/tomcat/tomcat基础/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!