Lightstreamer - Quickstart Example - Java ME Client
The Quickstart Example provides the source code to build very simple and basic client applications, used to test the capability of the Client APIs to connect and receive data from Lightstreamer Server. The examples can be used to familiarize with the Client APIs and as a reference on how to use them, and can be used as a starting point for client application implementations.
This project contains the source files of a sample application that shows how the Lightstreamer Java ME Client API can be used to connect to Lightstreamer Server.
These examples, called "Tester" and "DistinctTester", are not made for running on real devices, because the output is written on the console. Moreover, nothing is displayed on the display.
By the current configuration, specified in
/src/javametest/Tester.java and in
/src/javametest/DistinctTester.java, the demos try to connect to a local installation of Lightstreamer Server. If needed, the host name, the port number, the Adapter Set name, and the Data Adapter name could be changed in the source code.
Check out the sources code for further explanations.
To build and install a version of this demo, pointing to your local Lightstreamer Server instance, follow the steps below.
Testerclass, needs both the PORTFOLIO_ADAPTER (see Lightstreamer - Portfolio Demo - Java Adapter), and the QUOTE_ADAPTER (see Lightstreamer - Stock-List Demo - Java Adapter). Therefore, as a prerequisite, the full version of the Lightstreamer - Portfolio Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance. Please follow the instructions in Install the Portfolio Demo to install it.
DistinctTesterclass needs the CHAT_ROOM Adapter, therefore, as a prerequisite, the Lightstreamer - Basic Chat Demo - Java Adapter has to be deployed on your local Lightstreamer Server instance.
- Get the Lighstreamer SDK for Java ME Clients: copy the
ls-j2me-clientfile from the
/DOCS-SDKs/sdk_client_java_me/libfolder of the latest Lightstreamer distribution into the
libdirectory of the project.
Lightstreamer Adapters Needed by This Demo Client
- Lightstreamer - Stock-List Demo - Java Adapter
- Lightstreamer - Portfolio Demo - Java Adapter
- Lightstreamer - Basic Chat Demo - Java Adapter
- Lightstreamer - Reusable Metadata Adapters - Java Adapter
Lightstreamer Compatibility Notes
- Compatible with Lightstreamer Java ME Client API v. 3.2.1 or newer.
- Ensure that Java ME Client API is supported by Lightstreamer Server license configuration.