java.lang.Object
io.cloudevents.core.data.PojoCloudEventData<T>
- Type Parameters:
T- the type of the wrapped POJO.
- All Implemented Interfaces:
io.cloudevents.CloudEventData
An implementation of
CloudEventData that wraps any POJO.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface defining a conversion from T to byte array. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetValue()inthashCode()byte[]toBytes()static <T> PojoCloudEventData<T>wrap(T data, PojoCloudEventData.ToBytes<T> mapper) Wrap the provided data in aPojoCloudEventDataserializable by the provided mapper.
-
Method Details
-
getValue
- Returns:
- the wrapped POJO
-
toBytes
public byte[] toBytes()- Specified by:
toBytesin interfaceio.cloudevents.CloudEventData
-
equals
-
hashCode
public int hashCode() -
wrap
Wrap the provided data in aPojoCloudEventDataserializable by the provided mapper.- Type Parameters:
T- The type ofdata- Parameters:
data- the POJO to wrapmapper- converter fromdatato bytes, used to implementtoBytes()- Returns:
- the new
PojoCloudEventData
-