This project provides a library for remote method invocations between the browser and a Jetty Web Server using the HTML5's WebSocket. RMIWebSocket can be used as an alternative to XMLHttpRequest in developing rich Internet applications.
RMI WebSocket enables tight method-level integration between the user interface and the server, where the Javascript can call Java methods on the server and the server can call Javascript methods on the browser. It takes care of serializing and de-serializing the requests and responses using the Jackson JSON processor.
By modeling the communication between the Javascript and Java-server code as method calls, RMI WebSocket allows developers to apply UI patterns such as MVP (Model-View-Presenter) to their web application.
You should not use RMIWebSockets if
You can include RMI Websocket to your project by adding this dependency:
<dependency> <groupId>com.lambdazen.websocket</groupId> <artifactId>rmi-websocket</artifactId> <version>1.0</version> </dependency>
The project artifacts are hosted in the Sonatype OSS Maven Repository at https://oss.sonatype.org/content/groups/public/. You can add this to your pom.xml or settings.xml by following these instructions
Wiki: Basic usage
Wiki: Passing complex types
Wiki: Protocol details