MCPcopy Index your code
hub / github.com/cloudevents/sdk-java

github.com/cloudevents/sdk-java @v4.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v4.1.1 ↗ · + Follow
1,671 symbols 6,269 edges 318 files 343 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Java SDK for CloudEvents API

License Maven Central Javadocs

The Java SDK for CloudEvents is a collection of Java packages to adopt CloudEvents in your Java application.

Using the Java SDK you can:

  • Access, create and manipulate CloudEvent inside your application.
  • Serialize and deserialize CloudEvent back and forth using the CloudEvents Event Format, like JSON.
  • Read and write CloudEvent back and forth to HTTP, Kafka, AMQP using the CloudEvents Protocol Binding implementations we provide for a wide range of well-known Java frameworks/libraries.

To check out the complete documentation and how to get started, look at the dedicated website https://cloudevents.github.io/sdk-java/.

Status

This SDK is considered work in progress. The community is working hard to bring you a new major version of the SDK with major enhancements both to APIs and to implementation.

If you want to know more about v1 of this SDK, check out the v1 readme

Stay tuned!

Supported features of the specification:

v0.3 v1.0
CloudEvents Core :heavy_check_mark: :heavy_check_mark:
AMQP Protocol Binding :x: :x:
- Proton :heavy_check_mark: :heavy_check_mark:
AVRO Event Format :x: :x:
HTTP Protocol Binding :heavy_check_mark: :heavy_check_mark:
- Vert.x :heavy_check_mark: :heavy_check_mark:
- Jakarta EE 8 Restful WS :heavy_check_mark: :heavy_check_mark:
- Jakarta EE 9+ Restful WS :heavy_check_mark: :heavy_check_mark:
- Basic :heavy_check_mark: :heavy_check_mark:
- Spring :heavy_check_mark: :heavy_check_mark:
- http4k :heavy_check_mark: :heavy_check_mark:
JSON Event Format :heavy_check_mark: :heavy_check_mark:
- Jackson :heavy_check_mark: :heavy_check_mark:
Protobuf Event Format :heavy_check_mark: :heavy_check_mark:
- Proto :heavy_check_mark: :heavy_check_mark:
Kafka Protocol Binding :heavy_check_mark: :heavy_check_mark:
MQTT Protocol Binding :x: :x:
NATS Protocol Binding :x: :x:
Web hook :x: :x:

† Source/artifacts hosted externally

Documentation

Documentation is available at https://cloudevents.github.io/sdk-java/.

Javadocs are available on javadoc.io:

You can check out the examples in the examples directory.

Used By

Occurrent Knative Eventing http4k
Occurrent http4k

Community

  • There are bi-weekly calls immediately following the Serverless/CloudEvents call at 9am PT (US Pacific). Which means they will typically start at 10am PT, but if the other call ends early then the SDK call will start early as well. See the CloudEvents meeting minutes to determine which week will have the call.
  • Slack: #cloudeventssdk channel under CNCF's Slack workspace.
  • Email: https://lists.cncf.io/g/cncf-cloudevents-sdk
  • Contact for additional information: Francesco Guardiani (@slinkydeveloper on slack), Fabio José (@fabiojose on slack).

Each SDK may have its own unique processes, tooling and guidelines, common governance related material can be found in the CloudEvents community directory. In particular, in there you will find information concerning how SDK projects are managed, guidelines for how PR reviews and approval, and our Code of Conduct information.

If there is a security concern with one of the CloudEvents specifications, or with one of the project's SDKs, please send an email to cncf-cloudevents-security@lists.cncf.io.

Additional SDK Resources

Extension points exported contracts — how you extend this code

EvaluationExceptionFactory (Interface)
Interface to simplify the construction of an EvaluationException. [17 implementers]
sql/src/main/java/io/cloudevents/sql/EvaluationException.java
StructuredMessageWriter (Interface)
Interface to write the MessageReader content (CloudEvents attributes, extensions and payload) to a new represent [13 implementers]
core/src/main/java/io/cloudevents/core/message/StructuredMessageWriter.java
CloudEventData (Interface)
Interface that defines a wrapper for CloudEvent data. This interface can be overridden to include any type of data i [12 …
api/src/main/java/io/cloudevents/CloudEventData.java
ProtoCloudEventData (Interface)
A CloudEventData that supports access to a protocol buffer message. [1 implementers]
formats/protobuf/src/main/java/io/cloudevents/protobuf/ProtoCloudEventData.java
XMLCloudEventData (Interface)
A variant of CloudEventData that supports direct access to data as an XML Document [1 implementers]
formats/xml/src/main/java/io/cloudevents/xml/XMLCloudEventData.java
UserClient (Interface)
(no doc)
examples/restful-ws-quarkus/src/main/java/io/cloudevents/examples/quarkus/client/UserClient.java
Function (Interface)
Function is a CloudEvents Expression Language function definition and implementation. [18 implementers]
sql/src/main/java/io/cloudevents/sql/Function.java
EventFormat (Interface)
An Event format specifies how to serial [6 implementers]
core/src/main/java/io/cloudevents/core/format/EventFormat.java

Core symbols most depended-on inside this repo

toString
called by 225
api/src/main/java/io/cloudevents/SpecVersion.java
build
called by 202
core/src/main/java/io/cloudevents/core/builder/CloudEventBuilder.java
withExtension
called by 98
core/src/main/java/io/cloudevents/core/builder/CloudEventBuilder.java
create
called by 96
sql/src/main/java/io/cloudevents/sql/EvaluationException.java
v1
called by 80
core/src/main/java/io/cloudevents/core/builder/CloudEventBuilder.java
get
called by 80
examples/restful-ws-quarkus/src/main/java/io/cloudevents/examples/quarkus/resources/UserResource.java
withSource
called by 77
core/src/main/java/io/cloudevents/core/builder/CloudEventBuilder.java
withId
called by 75
core/src/main/java/io/cloudevents/core/builder/CloudEventBuilder.java

Shape

Method 1,321
Class 306
Interface 34
Enum 10

Languages

Java100%

Modules by API surface

formats/json-jackson/src/test/java/io/cloudevents/jackson/JsonFormatTest.java26 symbols
core/src/main/java/io/cloudevents/core/builder/CloudEventBuilder.java21 symbols
sql/src/main/java/io/cloudevents/sql/impl/parser/ExpressionTranslatorVisitor.java17 symbols
core/src/main/java/io/cloudevents/core/v03/CloudEventV03.java16 symbols
sql/src/test/java/io/cloudevents/sql/TCKTestSuite.java15 symbols
sql/src/test/java/io/cloudevents/sql/CustomFunctionsTest.java15 symbols
formats/xml/src/test/java/io/cloudevents/xml/XMLFormatTest.java15 symbols
formats/json-jackson/src/main/java/io/cloudevents/jackson/JsonFormatOptions.java15 symbols
core/src/main/java/io/cloudevents/core/v1/CloudEventV1.java15 symbols
core/src/main/java/io/cloudevents/core/impl/BaseCloudEventBuilder.java15 symbols
spring/src/test/java/io/cloudevents/spring/webflux/WebFluxRestControllerTests.java14 symbols
spring/src/test/java/io/cloudevents/spring/mvc/MvcRestControllerTests.java14 symbols

For agents

$ claude mcp add sdk-java \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact