From the course: Building Real-Time Web Apps with Spring Boot and WebSockets

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Extending the controller for interaction updates

Extending the controller for interaction updates

From the course: Building Real-Time Web Apps with Spring Boot and WebSockets

Start my 1-month free trial

Extending the controller for interaction updates

- So we just created our first controller to handle the simplest case of a user sending a message to a destination and the web socket server broadcasting that message back to other participants. For our next coding exercise, we're going to extend that controller to provide the hallmark feature of any modern chat app. We need to provide that visual key that another participant is typing. In order to provide that real time update about users typing, we'll need to implement a controller handler method and map the additional topic subscription. So let's get started so you can see how that's done. To begin this exercise, I'm going into my controller package and opening the chat controller class. I'm gonna double click on the editor for that class so we can maximize the space that we have. So we're gonna pick up from where we left off in our last exercise. We need to add another method so that we can let other users know when someone is typing. So for our next method, we're gonna give it a…

Contents