October 2018
Intermediate to advanced
590 pages
15h 5m
English
Now, let's start the rest of the implementation of our real-time communication on the server side. As introduced earlier, we build the communication using a channel-based pattern, but the default API that WebSocketHandler provides doesn't have the concept of the channel. It defines a generic interface. We will need to extend it.
As mentioned earlier, our implementation of this interface is WebSocketRequestDispatcher. It is inspired by Spring MVC's DispatcherServlet. Inside the handleTextMessage() method of WebSocketRequestDispatcher, we will ask ChannelHandlerResolver to find the channel handler that is registered to handle the message sent to the specified channel. Once the channel handler is located, ...
Read now
Unlock full access