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.
Loading...
Related Quiz
- Which HTTP header is commonly used to control cache behavior in web browsers?
- In which scenario would you use HttpSessionIdListener?
- If a filter needs to perform different actions based on the type of HTTP request, which method or object should it use to determine this?
- In connection pooling, the pool size is defined by the _________ and _________ parameters.
- What is the best approach to maintain user sessions in a distributed web application environment?