forked from adamfisk/LittleProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial rough pass at Netty 4 upgrade
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Resources | ||
--------- | ||
|
||
http://netty.io/news/2013/06/18/4-0-0-CR5.html | ||
http://netty.io/4.0/api | ||
http://docs.jboss.org/netty/3.2/api/ | ||
|
||
|
||
Relevant Changes | ||
---------------- | ||
1. ServerBootstrap no longer takes a ServerSocketChannelFactory in its constructor. We used to use this to configure the thread pools. Looks like EventLoopGroup or its relatives are the place to look. | ||
|
||
2. Same thing as #1 is true for ClientSocketChannelFactory. | ||
|
||
3. ChannelPipelineFactory is gone. Looks like one uses .childHandler() with a ChannelInitializer instead. | ||
|
||
4. What's up with ThreadRenamingRunnable in DefaultHttpProxyServer? | ||
|
||
5. DefaultChannelGroup? | ||
|
||
6. SimpleChannelUpstreamHandler -> SimpleChanneInboundHandler | ||
|
||
7. InterestOps is gone - what does this mean to setReadable() and channelInterestChanged() ? | ||
|
||
8. channelOpened() -> channelRegistered() ? | ||
|
||
9. channelClosed() -> channelDeregistered() ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// This code generates a UML diagram on yuml.me. The diagram's purpose is mostly to understand dependencies | ||
// in order to facilitate the upgrade from Netty 3.x to 4.x. It is neither a precise, complete nor accurate representation | ||
// of the object model. | ||
// Green background - Netty classes that appear to be carrying over from 3.x to 4.x | ||
// Red background - Netty classes that were lost in 4.x | ||
// Orange background - Netty classes introduced in 4.x that replace a class from 3.x | ||
|
||
|
||
|
||
|
||
[<<HttpProxyServer>>]^-.-[DefaultHttpProxyServer] | ||
[DefaultHttpProxyServer]creates ->[<<ProxyAuthorizationManager>>] | ||
[<<ProxyAuthorizationManager>>]^-.-[DefaultProxyAuthorizationManager] | ||
[DefaultHttpProxyServer]creates ->[<<ChainProxyManager>>] | ||
[DefaultHttpProxyServer]creates ->[<<HandshakeHandlerFactory>>] | ||
[<<HandshakeHandlerFactory>>]^-.-[SslHandshakeHandlerFactory] | ||
[<<HandshakeHandlerFactory>>]^-.-[SelfSignedSslHandshakeHandlerFactory] | ||
[DefaultHttpProxyServer]creates ->[<<HttpRequestFilter>>] | ||
[<<HttpRequestFilter>>]^-.-[PublicIpsOnlyRequestFilter] | ||
[<<HttpRequestFilter>>]^-.-[RegexHttpRequestFilter] | ||
[<<HttpRequestFilter>>]^-.-[ProxyUtils.PASS_THROUGH_REQUEST_FILTER] | ||
[DefaultHttpProxyServer]creates ->[<<HttpResponseFilters>>] | ||
[DefaultHttpProxyServer]creates ->[<<ProxyCacheManager>>] | ||
[<<ProxyCacheManager>>]^-.-[DefaultProxyCacheManager] | ||
[<<ProxyCacheManager>>]^-.-[SimpleProxyCacheManager] | ||
[<<ProxyCacheManager>>]^-.-[ProxyUtils.Noop Cache Manager] | ||
[DefaultHttpProxyServer]creates ->[<<ChannelGroup>>{bg:green}] | ||
[<<ChannelGroup>>]^-.-[DefaultChannelGroup] | ||
[DefaultHttpProxyServer]creates ->[<<Timer>>{bg:green}] | ||
[<<Timer>>]^-.-[HashedWheelTimer{bg:green}] | ||
[DefaultHttpProxyServer]creates ->[<<ServerSocketChannelFactory>>{bg:red}] | ||
[<<ServerSocketChannelFactory>>]^-.-[NioServerSocketChannelFactory{bg:red}] | ||
[DefaultHttpProxyServer]creates ->[<<ClientSocketChannelFactory>>{bg:red}] | ||
[<<ClientSocketChannelFactory>>]^-.-[NioClientSocketChannelFactory{bg:red}] | ||
[<<ChannelFactory>>{bg:green}]^-.-[<<ServerSocketChannelFactory>>] | ||
[<<ChannelFactory>>{bg:green}]^-.-[<<ClientSocketChannelFactory>>] | ||
[DefaultHttpProxyServer]creates ->[ServerBootstrap{bg:green}] | ||
[ServerBootstrap]->[<<ServerSocketChannelFactory>>] | ||
[<<ServerSocketChannelFactory>>]superseded by ->[<<EventLoopGroup>>{bg:orange}] | ||
[<<ClientSocketChannelFactory>>]superseded by ->[<<EventLoopGroup>>{bg:orange}] | ||
[ServerBootstrap]->[<<ChannelPipelineFactory>>{bg:red}] | ||
[<<ChannelPipelineFactory>>]^-.-[HttpServerPipelineFactory] | ||
[<<ChannelPipelineFactory>>]superseded by ->[<<ChannelInitializer>>{bg:orange}] | ||
// Next section - HttpServerPipelineFactory | ||
[HttpServerPipelineFactory]->[<<ChannelGroup>>{bg:orange}] | ||
[HttpServerPipelineFactory]->[<<ProxyAuthorizationManager>>] | ||
[HttpServerPipelineFactory]->[<<ChainProxyManager>>] | ||
[HttpServerPipelineFactory]->[<<HandshakeHandlerFactory>>] | ||
[HttpServerPipelineFactory]->[<<RelayPipelineFactory>>] | ||
[<<RelayPipelineFactory>>]^-.-[DefaultRelayPipelineFactory] | ||
[<<RelayPipelineFactory]->[<<ChannelPipelineFactory>>] | ||
[HttpServerPipelineFactory]->[<<Timer>>] | ||
[HttpServerPipelineFactory]->[<<ClientSocketChannelFactory>>{bg:orange}] |
File renamed without changes.