Interface GenericObject
-
- All Known Subinterfaces:
GenericRecord
public interface GenericObjectThis is an abstraction over the logical value that is store into a Message. Pulsar decodes the payload of the Message using the Schema that is configured for the topic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetNativeObject()Return the internal native representation of the Object, like a AVRO GenericRecord, a String or a byte[].SchemaTypegetSchemaType()Return the schema tyoe.
-
-
-
Method Detail
-
getSchemaType
SchemaType getSchemaType()
Return the schema tyoe.- Returns:
- the schema type
- Throws:
java.lang.UnsupportedOperationException- if this feature is not implemented- See Also:
when the topic has no schema information,SchemaType.STRING,SchemaType.AVRO,SchemaType.PROTOBUF_NATIVE,SchemaType.JSON
-
getNativeObject
java.lang.Object getNativeObject()
Return the internal native representation of the Object, like a AVRO GenericRecord, a String or a byte[].- Returns:
- the decoded object
- Throws:
java.lang.UnsupportedOperationException- if the operation is not supported
-
-