/up-kotlin

uProtocol Language Specific Library for Kotlin

Primary LanguageKotlinApache License 2.0Apache-2.0

Eclipse uProtocol Kotlin Library

Overview

This library implements the uProtocol Language Specific Library Requirements for Kotlin defined in uProtocol Specifications. The library is organized into packages that are described in SDK Packages below. Each package contains a README.adoc file that describes the purpose of the package and how to use it.

The module contains the factory methods, serializers, and validators for all data types defined in the specifications, and any data models that either haven’t or couldn’t be defined in up-core-api yet.

Getting Started

Importing the sdk

To pull the Library from maven central, setting ${uprotocol.version} to the latest version of this library in your pom.xml file:

<!-- uProtocol Core -->
<dependency>
    <groupId>org.eclipse.uprotocol</groupId>
    <artifactId>up-kotlin</artifactId>
    <version>${uprotocol.version}</version>
</dependency>

Using The Library

Table 1. SDK Packages
Package Purpose

communication

Top level client-facing communication layer (uP-L2) interfaces that applications and services use to implement the publisher/subscriber, notification, and RPC patterns on top of the transport layer (uTransport) API.

uuri

Builders, validators, and serializers for uProtocol addressing scheme (UUri).

uuid

Identifier used to uniquely identify (and timestamp) messages that are sent

transport

uP-L1 Transport Layer interface and data model that wraps communication middlewares like zenoh, mqtt, http, etc…​ into a thin and simple to use transport interface. This model is used by the communication layer (uP-L2) to send and receive messages and transports are expected to implement the uTransport interface.

Note
Please visit the READMEs in SDK Packages for examples of how to use the different data types and their factories, validators, and serializers.