Module io.cloudevents.api
Package io.cloudevents.rw
Interface CloudEventDataMapper<R extends CloudEventData>
- Type Parameters:
R- the returnedCloudEventDatafrom this mapper.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@ParametersAreNonnullByDefault
public interface CloudEventDataMapper<R extends CloudEventData>
Interface to convert a
CloudEventData instance to another one.-
Method Summary
Modifier and TypeMethodDescriptionstatic CloudEventDataMapper<CloudEventData>identity()map(CloudEventData data) Mapdatato anotherCloudEventDatainstance.
-
Method Details
-
map
Mapdatato anotherCloudEventDatainstance.- Parameters:
data- the input data- Returns:
- The new data
- Throws:
CloudEventRWException- is anything goes wrong while mapping the input data
-
identity
- Returns:
- No-op identity mapper which can be used as default when no mapper is provided.
-