Sharing Top Content from the Angular-sphere.

Real-time Applications with AngularJS and Java – Part 3

Real-time Applications with #Angularjs and #Java – Part 3

  • Like I said above, in order to send the Task objects to the client, we need to keep track of the active sessions.
  • public class Client { private final String id; private final Session session; public Client(Session session) { this.id = this.toString(); this.session = session; } public void sendText(String text) throws IOException { this.session.getBasicRemote().sendText(text); } public String getId() { return id; } // hashCode() and equals() }
  • I added the Client that is the owner of the Task and a flag called universal that would make the Task visible to all clients.

Read the full article, click here.


@webcodegeeks: “Real-time Applications with #Angularjs and #Java – Part 3”


This article is the last one of a series of three on real-time applications. In part 1, I have created a simple Task management application and implemented the Periodic Refresh AJAX pattern to make it feel as if the UI was updated in real-time when tasks were created. In part 2, I modified the project so only updated (delta) information was sent to the browser and I implemented Long Polling to get a better real-time feel. The plan now in part 3 is to go ahead and try the HTML5 WebSocket.


Real-time Applications with AngularJS and Java – Part 3 | Examples Java Code Geeks – 2016

Comments are closed, but trackbacks and pingbacks are open.