Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.96 KB

File metadata and controls

39 lines (27 loc) · 1.96 KB

uProtocol Transport Interface & Data Model

Table of Contents

1. Overview

The following section implements uP-L1 Transport Layer Specifications. The purpose of the transport layer is to wrap communication middlewares into a common interface that allows us to send and receive any kind of uProtocol messages (publish, request, response, notification) over any kind of transport (HTTP, MQTT, WebSockets, etc).

the datamodel is declared in the uProtocol specifications project in up-core-api folder and this project declares the language specific transport interface (UListener & UTransport) and the builders, serializers, and validators, for the up-core-api data model. .

Below are the list of the classes and interfaces that are part of the uProtocol Transport Interface & Data Model:

Table 1. Transport Interfaces
Class/Interface Description

UTransport

Interface that defines the methods that a transport middleware must implement in order to be used by the uProtocol library.

UListener

Callback/listener interface to be able to receive messages from a transport.

UMessageKtExt

Kotlin Dsl to build request, response, publish and notification UMessage, and set functions to set attributes.

UAttributesValidator

uProtocol Attributes validator that ensures that the publish, notification, request, and response messages are built with the correct information.

2. Examples

In the following section we will provide an example for how a transport implementations are expected to implement the uTransport library

// include::../../../../../../test/java/org/eclipse/uprotocol/communication/TestUTransport.java[]