Lightstreamer JMS Extender Android Client Lib

An implementation of the JMS 2.0 specification for connecting to any JMS broker via Lightstreamer JMS Extender

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

com.lightstreamer
ArtifactId

ArtifactId

ls-jms-android-client
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

aar
Description

Description

Lightstreamer JMS Extender Android Client Lib
An implementation of the JMS 2.0 specification for connecting to any JMS broker via Lightstreamer JMS Extender
Project URL

Project URL

https://github.com/Lightstreamer/JMSExtender-lib-client-java
Source Code Management

Source Code Management

https://github.com/Lightstreamer/JMSExtender-lib-client-java

Download ls-jms-android-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.lightstreamer/ls-jms-android-client/ -->
<dependency>
    <groupId>com.lightstreamer</groupId>
    <artifactId>ls-jms-android-client</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.lightstreamer/ls-jms-android-client/
implementation 'com.lightstreamer:ls-jms-android-client:1.0.0'
// https://jarcasting.com/artifacts/com.lightstreamer/ls-jms-android-client/
implementation ("com.lightstreamer:ls-jms-android-client:1.0.0")
'com.lightstreamer:ls-jms-android-client:aar:1.0.0'
<dependency org="com.lightstreamer" name="ls-jms-android-client" rev="1.0.0">
  <artifact name="ls-jms-android-client" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.lightstreamer', module='ls-jms-android-client', version='1.0.0')
)
libraryDependencies += "com.lightstreamer" % "ls-jms-android-client" % "1.0.0"
[com.lightstreamer/ls-jms-android-client "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
javax.jms : javax.jms-api jar 2.0
com.lightstreamer : ls-android-client jar 4.2.1

runtime (2)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar 2.8.1
com.fasterxml.jackson.core : jackson-databind jar 2.8.1

Project Modules

There are no modules declared in this project.

Lightstreamer JMS Extender Java Client SDK

The Lightstreamer JMS Extender Java Client Library enables any Java or Android application to connect to any JMS broker through the mediation of the JMS Extender, by using the standard JMS interface.

This library is a direct implementation of the JMS 2.0 specification.

Compatibility

The library is compatible with Lightstreamer JMS Extender since version 2.0.0.

Installation

Although there is no formal difference from a developer's perspective, a specific version of the library exists for both the Java SE and Android platforms.

Java SE

The Java SE variant of the library requires Java version 8 or later.

Maven

For Maven, add the following dependency to your pom.xml:

<dependency>
    <groupId>com.lightstreamer</groupId>
    <artifactId>ls-jms-javase-client</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle

For Gradle, update the repositories and dependencies sections of the build.gradle file as follows:

repositories {
  ...
  maven {
      url 'https://www.lightstreamer.com/repo/maven'
  }
  ...
}

dependencies {
    ...
    implementation 'com.lightstreamer:ls-jms-javase-client:1.0.0'
    ...
}

Android

The Android variant of the library requires Android 10.0 (API Level 29) or later.

Update the build.gradle file as follows:

repositories {
  ...
  maven {
      url 'https://www.lightstreamer.com/repo/maven'
  }
  ...
}

dependencies {
    ...
    implementation 'com.lightstreamer:ls-jms-android-client:1.0.0'
    ...
}

Note how for gradle-based projects, you have to explicitly specify the additional repository, which hosts some transitive dependencies of the library.

Quick Start

...
// Create a connection factory for establishing a connection to the JMS Extender instance listening
// at the specified URL, using the specified JMS connector.
ConnectionFactory factory = new LSConnectionFactory("http://my.push.server:8080/", "ActiveMQ");

// Create a connection and set an exception handler.
Connection connection = factory.createConnection("user", "password");
connection.setExceptionListener(new ExceptionListener() {
  public void onException(JMSException exception) {
    // Handle exceptions here
  }
});

// Create a session.
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

// Create a topic.
Topic topic = sessions.createTopic("stocksTopic");

// Create a message consumer and set a message listener for handling incoming messages from the topic.
MessageConsumer consumer = sessions.createConsumer(topic);
consumer.setMessageListener(new MessageListener() {
    public void onMessage(Message message) {
    // Handle messages here
    }
});

// Start the connection.
connection.start();
...

Building

To build the library you need:

  • JVM version 8 or later.
  • The Android command line tools.

To install the Android command line tools, follow these steps:

  • Download the tools package and extract it into <your_android_sdk_root>/cmdline-tools folder, where <your_android_sdk_root> is a folder in your system.
  • Export the ANDROID_SDK_ROOT environment variable:
    $ export ANDROID_SDK_ROOT=<your_android_sdk_root>
  • From <your_android_sdk_root>/cmdline-tools/tools/bin, run the following command and accept all offered SDK package licenses:
    $ ./sdkmanager --licenses

Then, run the Gradle build task:

$ ./gradlew build

After that, you can find all generated artifacts (library, javadocs, and source code) under:

  • javase-lib, for the Java SE library
  • android-lib, for the Android library

Documentation

Examples

Support

For questions and support please use the Official Forum. The issue list of this page is exclusively for bug reports and feature requests.

License

Apache 2.0

com.lightstreamer

Lightstreamer

The Lightstreamer company

Versions

Version
1.0.0
1.0.0-alpha-03
1.0.0-alpha-02