Menu

Home

Sridhar Ramachandran

Overview

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 are targeting an audience that uses browsers that don't support WebSockets
  • you want to customize the over-the-wire protocol to establish a standard protocol or improve efficiency.

Maven

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

Further topics


Related

Wiki: Basic usage
Wiki: Passing complex types
Wiki: Protocol details

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.