@Target(TYPE)
@Retention(RUNTIME)
@Deprecated
public @interface WebSocket
Annotation used to declare a WebSocket which communicates endpoints with the WebSocket Protocol (RFC6455).
The class annotated by the @WebSocket annotation must implement the
WebSocketListener interface. The corresponding
WebSocketListener instance is used to handle messages over the
WebSocket to which the resource path is matched by the path pattern specified
by the pathPatterns attribute of the @WebSocket annotation.
Example:
@WebSocket (
pathPatterns = {"/chat/*"},
dispatchPolicy = "ChatWorkManager",
timeout = 30,
maxConnections = 1000
)
public class MyListener implements WebSocketListener {
...
}