Skip to content

eclipse-uprotocol/up-java

Repository files navigation

Eclipse uProtocol Java Library

Overview

This library implements the uProtocol Language Specific Library Requirements for Java 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 Library

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-java</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.

cloudevent

A representation of uProtocol messages used in older versions of the specifications and kept for backwards compatibility.