In Java EE 7, the Java package
javax.websocket is the root for WebSockets. There is one package underneath this one for server endpoints:
The server-side endpoint in Java represents one end of the peers. Java applications with WebSocket endpoints are created through programming directly against the library. Otherwise, the endpoints are determined by annotations in the JSR 356 specification.
javax.websocket.server.ServerEndpoint is applied to classes that execute an endpoint on the server. The annotation requires a URL pattern fragment similar to the Servlet 3.1 annotation
@javax.servlet.WebServlet, which determines how the implementation provider routes an incoming WebSockets request ...