Java EE has always been an adopter of emerging standards and features and capabilities, which were required by the Java EE community. Starting from Java EE 6, Java EE spec leads focused their attention on the emerging standards and in Java EE 7 full support for HTML5, SSE and WebSockets is included in the spec; thus any Java EE application server can host a WebSockets, SSE, and HTML5-oriented application without any compatibility issue at the server side.
For the SSE, which is an HTML5 browser API component, the server side can be a Servlet that produces SSE messages according to the SSE message format or it can be a SSE resource which is POJO annotated with @Path
. In the client side, JavaScript can be used as the standard in-browser API to consume the SSE events or it can be developed using the SSE client side API introduced in Jersey 2.0 if a Java-based client is required.
The following table shows the important classes and...