-
-
Notifications
You must be signed in to change notification settings - Fork 139
Netty
Ohad Shai edited this page Oct 2, 2018
·
3 revisions
jasync-sql is using netty for its async communication with the database.
This page will describe the extensions over netty and how the framework is used.
- Note: Relevant examples here will be in MySQL code but is the same for other drivers.
The entry point for bootstrapping is ConnectionHandler which extends SimpleChannelInboundHandler.
On the connect() method it inits the Channel add all encoders/decoders and itself to handlers list.
In this class, the main method that recieves messages is channelRead0().
Over there messages that arrives are already decoded by FrameDecoder that extends ByteToMessageDecoder.
The actual binary result data is not yet decoded, this is the responsibility of BinaryRowDecoder class.