@ParametersAreNonnullByDefault public final class EventFormatProvider extends Object
EventFormat implementations through ServiceLoader.
You can resolve an event format using EventFormatProvider.getInstance().resolveFormat(contentType).
You can programmatically add a new EventFormat implementation using registerFormat(EventFormat).
| Modifier and Type | Method and Description |
|---|---|
static EventFormatProvider |
getInstance() |
void |
registerFormat(EventFormat format)
Register a new
EventFormat programmatically. |
EventFormat |
resolveFormat(String contentType)
Resolve an event format starting from the content type.
|
public static EventFormatProvider getInstance()
EventFormatProviderpublic void registerFormat(EventFormat format)
EventFormat programmatically.format - the new format to register@Nullable public EventFormat resolveFormat(String contentType)
contentType - the content type to resolve the event formatCopyright © 2020. All rights reserved.