โข
WebFlux ๋ ํฌ๊ฒ ๋ ๋ถ๋ถ์ผ๋ก ๊ตฌ์ฑ๋๋ค.
โฆ
publisher ์์ฑ ๋ถ๋ถ
โฆ
publisher subscribe ๋ถ๋ถ
โข
์ด ๋ ๋ถ๋ถ์ reactor.netty.http.server ํจํค์ง์ HttpServer$onStateChange ๋ฉ์๋์์ ์คํ๋๋ค.
โฆ
Publisher<Void> publisher = (Publisher)this.handler.apply(ops, ops);
โฆ
mono.subscribe(ops.disposeSubscriber());
HttpWebHandlerAdapter
โข
publisher ์์ฑ ํต์ฌ ํด๋์ค
โข
handle ํธ์ถ๋๋ ๊ณผ์
โฆ
this.handler.apply(ops, ops) โ ReactorHttpHandlerAdapter$apply ํธ์ถ
โช
ReactorHttpHandlerAdapter ์์๋ request ์ response ๋ฅผ ์์ฑ
ReactorServerHttpRequest request = new ReactorServerHttpRequest(reactorRequest, bufferFactory);
ServerHttpResponse response = new ReactorServerHttpResponse(reactorResponse, bufferFactory);
JavaScript
๋ณต์ฌ
โฆ
this.httpHandler.handle(request, response) โ WebServerManager$DelayedInitializationHttpHandler$handle ํธ์ถ
โฆ
this.delegate.handle(request, response) โ HttpWebHandlerAdapter$handle ํธ์ถ
โข
exchange ์์ฑ
ServerWebExchange exchange = this.createExchange(request, response);
JavaScript
๋ณต์ฌ
โข
ExceptionHandlingWebFilter, FilteringWebHandler โ extends WebHandlerDecorator
โข
DefaultWebFilterChain$filter ์์ Mono.defer(() โ {}) ๋ก Mono defer ๋ฅผ ๋ง๋ ๋ค.
DispatcherHandler
โข
subscribe ํต์ฌ ํด๋์ค
โข
subscribe ํ๋ฉด DefaultWebFilterChain$filter {} ์์ handler.handle() ๋ก DispatcherHandler ๊ฐ ํธ์ถ๋จ.