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 and organized by the layers of the protocol.

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 Protocol Layer Purpose

client

Application Layer (uP-L3)

Top level client-facing interfaces to communication with USubscription, UDiscovery, and UTwin services.

communication

communication layer (uP-L2)

Common implementation of communication messaging patterns (publisher, subscriber, Rpcclient, RpcServer, etc..) tha t is build on top of the L1 transport interface (see below)

transport

Transport Layer (uP-L1)

Interface and data model for how to send() and receive() messages in a common way across various transport technologies (ex. zenoh, mqtt, http, etc…​). the interface is implemented by transports (ex. up-transport-android-java), and the interface is then used to build the uProtocol layer 2 communication layer implementation.

uuri

Basics

uProtocol addressing scheme (UUri) builders, validators, and serializers.

uuid

Basics

uProtocol unique identifier builders, validators, and serializers.

cloudevent

Legacy

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