Netty 4.0.0.CR2 released
It's my pleasure to announce the second release candidate for Netty 4.0.0. Unfortunatelly, there is some API-breakage when upgrading from the previous release. We had to do this to eliminate some design issues which were found by users. Please read this post before an upgrade.
Thanks again to everyone who helped us fix issues and make the release even more stable.
You can grab the release from our download page and from the Maven central repository.
If you have any feedback please let us know, we really appreciate them.
Please read this section before upgrading to CR2.
ChannelHandler and its sub-types
ChannelHandler.beforeAdd/Remove(...)was removed because it made it very difficult to fullfill the thread model while not blocking at all.
ChannelHandler.afterAdd/Remove(...)was renamed to
This may not affect any of your code if you not made use of those and just extended the Adapter classes.
ChannelInbound/OutboundHandler and its sub-types
ChannelOutboundHandler.freeOutboundBuffer()because it's not useful anymore since we introduced reference counting in the previous releases.
This may not affect any of your code because you usually extend
*Adapters and don't override the mentioned methods.
decode(...)now take a
MessageBuf<Object>as a parameter and return
void. Therefore, once you encoded or decoded a message, you have to add the message to the
MessageBuf<Object>given as a parameter. This change simplifies message handling by enabling the removal of automatic array unfolding.
This will most likely affect you if you wrote a codec based on the codec framework.
SslHandler.handshake()was renamed to
handshakeFuture()for consistency. Also, it now returns a
Future<Channel>instead of a
Future<Channel>instead of a
ByteBufHolder and its sub-types
ByteBufHolder.data()was renamed to
content(). The sub-types, for instance, include
ChannelPipeline.remove/replaceAndForward(...)has been merged into
Bootstrap.shutdown()were deprecated. Please use the
EventExecutorGroup.shutdownGracefully()method instead. See the next section for more information.
- Fixed the API contract violation against
java.util.concurrent.ExecutorServicewith respect to the
EventExecutorGroup.shutdown()has been deprecated by
shutdownGracefully()wherever possible to avoid any trouble such as resource leak during a shutdown.
Changes in general
This release fixed 90 issues. It's highly recommended to upgrade as soon as possible. We'd like to apologize that the upgrade process might not be as smooth as 'dropping the new JAR', but we believe all the changes were really worth the pain before going final.
Besides all the fixes, this release also ships with a few new features which may be worth some more details:
- #762 adds
WebSockeClientHandlerwhich makes it super easy to write WebSocket clients with Netty. See the apidocs for more details.
- #1207 adds
WebSocketFrameAggregatorwhich can be used to aggregate partial frames.
- #1244 allows to pass
sendFile(..)operation to keep track of the transfer progress.
Visit here for the complete list of the changes.