接口 GenericObject
-
- 所有已知子接口:
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.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 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.
-
-
-
方法详细资料
-
getSchemaType
SchemaType getSchemaType()
Return the schema tyoe.- 返回:
- the schema type
- 抛出:
java.lang.UnsupportedOperationException- if this feature is not implemented- 另请参阅:
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[].- 返回:
- the decoded object
- 抛出:
java.lang.UnsupportedOperationException- if the operation is not supported
-
-