Giter Club home page Giter Club logo

lightstreamer-example-chattile-adapter-java's Introduction

Lightstreamer - Chat-Tile Demo - Java Adapter

The Chat-Tile Demo implements a simple chat/collaborative application based on Lightstreamer for its real-time communication needs.

This project shows the Data Adapter and Metadata Adapters for the Chat-Tile Demo and how they can be plugged into Lightstreamer Server.

As example of a client using this adapter, you may refer to the Chat-Tile Demo - HTML (JQuery, Masonry) Client and view the corresponding Live Demo.

Details

This project includes the implementation of the SmartDataProvider interface and the MetadataProviderAdapter interface for the Lightstreamer Chat-Tile Demo. Please refer to General Concepts for more details about Lightstreamer Adapters.

Java Data Adapter and MetaData Adapter

The Data Adapter accepts message submission for the unique chat room. The sender is identified by an IP address and a nickname.

The Metadata Adapter inherits from the reusable LiteralBasedProvider and just adds a simple support for message submission. It should not be used as a reference for a real case of client-originated message handling, as no guaranteed delivery and no clustering support is shown.

Install

If you want to install a version of this demo in your local Lightstreamer Server, follow these steps.

  • Download Lightstreamer Server (Lightstreamer Server comes with a free non-expiring demo license for 20 connected users) from Lightstreamer Download page, and install it, as explained in the GETTING_STARTED.TXT file in the installation home directory.
  • Get the deploy.zip file of the latest release, unzip it and copy the just unzipped ChatTile folder into the adapters folder of your Lightstreamer Server installation.
  • Get the ua-parser-1.2.2.jar file from ua_parser Java Library and copy it into the adapters/ChatTile/lib folder.
  • Get the snakeyaml-1.11.jar files from SnakeYAML and copy it into the adapters/ChatTile/lib folder.
  • [Optional] Supply a specific "LS_ChatTileDemo_Logger" and "LS_demos_Logger" category in logback configuration Lightstreamer/conf/lightstreamer_log_conf.xml.
  • Launch Lightstreamer Server.
  • Test the Adapter, launching the client listed in Clients Using This Adapter.

Build

To build your own version of LS_ChatTile_Demo_Adapters.jar, instead of using the one provided in the deploy.zip file from the Install section above, follow these steps.

  • Download this project.
  • Get the ls-adapter-interface.jar, ls-generic-adapters.jar, and log4j-1.2.15.jar files from the latest Lightstreamer distribution, and copy them into the lib directory.
  • Get the ua-parser-1.2.2.jar file from ua_parser Java Library, and copy it into the lib directory.
  • Get the snakeyaml-1.11.jar files from SnakeYAML, and copy it into the lib directory.
  • Build the jar LS_ChatTile_Demo_Adapters.jar with commands like these:
 >javac -source 1.7 -target 1.7 -nowarn -g -classpath lib/log4j-1.2.15.jar;lib/ls-adapter-interface.jar;lib/ls-generic-adapters.jar;lib/jbox2d-library-2.2.1.1.jar;lib/ua-parser-1.2.2.jar;lib/snakeyaml-1.11.jar -sourcepath src/ -d tmp_classes src/com/lightstreamer/adapters/ChatTileDemo/ChatTileAdapter.java
 
 >jar cvf LS_ChatTile_Demo_Adapters.jar -C tmp_classes com
  • Stop Lightstreamer Server; copy the just compiled LS_ChatTile_Demo_Adapters.jar in the adapters/ChatTile/lib folder of your Lightstreamer Server installation; restart Lightstreamer Server.

See Also

Clients Using This Adapter

Related Projects

Lightstreamer Compatibility Notes

  • Compatible with Lightstreamer SDK for Java Adapters since 5.1

lightstreamer-example-chattile-adapter-java's People

Contributors

bravo27 avatar marcotesta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.