Chapter 11. Provided ChannelHandlers and codecs

 

This chapter covers

  • Securing Netty applications with SSL/TLS
  • Building Netty HTTP/HTTPS applications
  • Handling idle connections and timeouts
  • Decoding delimited and length-based protocols
  • Writing big data

Netty provides codecs and handlers for numerous common protocols that you can use literally out of the box, reducing time and effort you would otherwise spend on fairly tedious matters. In this chapter we’ll explore these tools and their benefits, which include support for SSL/TLS and WebSocket, as well as for simply squeezing better performance out of HTTP with data compression.

11.1. Securing Netty applications with SSL/TLS

Data privacy is a matter of great concern today, and as developers we need to be prepared to address it. At a minimum we should be familiar with encryption protocols such as SSL and TLS,[1] which are layered on top of other protocols to implement data security. We have all encountered these protocols when accessing secure websites, but they are also used in applications that are not HTTP-based, such as Secure SMTP (SMTPS) mail services and even relational database systems.

1The Transport Layer Security (TLS) Protocol, version 1.2, http://tools.ietf.org/html/rfc5246.

11.2. Building Netty HTTP/HTTPS applications

11.3. Idle connections and timeouts

11.4. Decoding delimited and length-based protocols

11.5. Writing big data

11.6. Serializing data

11.7. Summary