@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 |
|---|---|
Set<String> |
getContentTypes()
Enumerate the supported content types.
|
static EventFormatProvider |
getInstance() |
void |
registerFormat(EventFormat format)
Register a new
EventFormat programmatically. |
EventFormat |
resolveFormat(ContentType contentType)
Resolve an event format starting from the content type.
|
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 registerpublic Set<String> getContentTypes()
@Nullable public EventFormat resolveFormat(String contentType)
contentType - the content type to resolve the event format@Nullable public EventFormat resolveFormat(ContentType contentType)
contentType - the content type to resolve the event formatCopyright © 2024. All rights reserved.