What is the role of @ServerEndpoint annotation in Java WebSocket API?

  • It configures the server's endpoint settings.
  • It defines the client's endpoint in a WebSocket connection.
  • It handles exceptions during WebSocket communication.
  • It marks a class as a WebSocket endpoint.
The @ServerEndpoint annotation in Java WebSocket API is used to mark a class as a WebSocket endpoint, allowing the class to handle WebSocket communication on the server side.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *