Java SDK for CloudEvents
Go to file
Matthias Wessendorf ea0f128a77 [maven-release-plugin] prepare release cloudevents-parent-0.2.1 2018-12-18 14:09:28 +01:00
api [maven-release-plugin] prepare release cloudevents-parent-0.2.1 2018-12-18 14:09:28 +01:00
cdi [maven-release-plugin] prepare release cloudevents-parent-0.2.1 2018-12-18 14:09:28 +01:00
http/vertx [maven-release-plugin] prepare release cloudevents-parent-0.2.1 2018-12-18 14:09:28 +01:00
.gitignore ☁️ CloudEvent Java API 2018-10-06 09:13:59 +02:00
.travis.yml adding jdk 8 CI builds 2018-11-22 12:51:06 +01:00
LICENSE Initial commit 2018-09-20 15:56:37 -04:00
README.md 📝 updating to 0.2.0 libraries for usage 2018-12-10 17:17:00 +01:00
pom.xml [maven-release-plugin] prepare release cloudevents-parent-0.2.1 2018-12-18 14:09:28 +01:00

README.md

Java SDK for CloudEvents API

Build Status License Maven Central Javadocs

A Java API for the CloudEvents specification

Motivation

The CloudEvents specification is vendor-neutral specification for defining the format of event data that is being exchanged between different cloud systems. The specification basically defines an abstract envelope for any event data payload, without knowing specific implementation details of the actual underlying event. The current version of the spec is at 0.2 and it describes a simple event format, which was demonstrated at last KubeCon 2018 using different Serverless platforms, such as Apache Openwhisk.

Java API

For Maven based projects, use the following to configure the CloudEvents Java SDK:

<dependency>
    <groupId>io.cloudevents</groupId>
    <artifactId>cloudevents-api</artifactId>
    <version>0.2.0</version>
</dependency>

Application developers can now create strongly-typed CloudEvents, such as:

// given
final String eventId = UUID.randomUUID().toString();
final URI src = URI.create("/trigger");
final String eventType = "My.Cloud.Event.Type";
final MyCustomEvent payload = ...

// passing in the given attributes
final CloudEvent<MyCustomEvent> cloudEvent = new CloudEventBuilder<MyCustomEvent>()
    .type(eventType)
    .id(eventId)
    .source(src)
    .data(payload)
    .build();

Possible Integrations

The API kept simple, for allowing a wide range of possible integrations: