Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to Facilitate Decoupling from Concrete Implementations of EventFormat #539

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

skepticoitusInteruptus
Copy link

Closes #537

Example Usage of Proposed Refactor

import io.cloudevents.CloudEvent;
import io.cloudevents.core.format.EventFormatProvider;
import io.cloudevents.core.builder.CloudEventBuilder;
import io.cloudevents.core.format.ContentType; // New constant to facilitate loose coupling in client applications

CloudEvent event = ...;

byte[] serialized = EventFormatProvider
    .getInstance()
    .resolveFormat(ContentType.PROTO) // EventFormatProvider.resolveFormat(...) overloaded 
    .serialize(event);                // for string and enum input options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Clients' Dependency on Concrete Implementations of EventFormat
1 participant