Today i just want to share a quick Scala goodie. We all know that i love Netty and Scala, so i wanted to write a little Goodie with Scala’s implicits.

With Implicits we can wrap transparently around an Object (such as and execute our own custom methods onto it.

Below we use the Netty 4 AttributeMap together with a few nice getters and setters. This makes it typesafe and comfortable to use. :)

Also notice the “answer” at the end, this way we can have central “answering” or general connection handling methods which can be easily called.

Have fun with it