public abstract class CloudEventsMaker extends Object
RecordParser. Callers create(RecordParser, SerializerType, String) create} a concrete
CloudEventsMaker for a specific connector type.| Modifier and Type | Class and Description |
|---|---|
static class |
CloudEventsMaker.FieldName
The constants for the names of CloudEvents attributes.
|
static class |
CloudEventsMaker.MongodbCloudEventsMaker
CloudEvents maker for records produced by MongoDB connector.
|
static class |
CloudEventsMaker.MysqlCloudEventsMaker
CloudEvents maker for records produced by MySQL connector.
|
static class |
CloudEventsMaker.PostgresCloudEventsMaker
CloudEvents maker for records produced by PostgreSQL connector.
|
static class |
CloudEventsMaker.SqlserverCloudEventsMaker
CloudEvents maker for records produced by SQL Server connector.
|
| Modifier and Type | Field and Description |
|---|---|
private org.apache.kafka.connect.data.Schema |
ceDataAttributeSchema |
static String |
CLOUDEVENTS_SPECVERSION |
(package private) static Map<SerializerType,String> |
CONTENT_TYPE_NAME_MAP |
private SerializerType |
dataContentType |
private String |
dataSchemaUriBase |
protected RecordParser |
recordParser |
private static String |
SCHEMA_URL_PATH |
| Modifier | Constructor and Description |
|---|---|
private |
CloudEventsMaker(RecordParser parser,
SerializerType contentType,
String dataSchemaUriBase) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.kafka.connect.data.Struct |
ceDataAttribute()
Construct the value of the data attribute of CloudEvents.
|
org.apache.kafka.connect.data.Schema |
ceDataAttributeSchema()
Construct the schema of the data attribute of CloudEvents.
|
String |
ceDatacontenttype()
Get the data content type of CloudEvents envelope.
|
String |
ceDataschemaUri(String schemaId)
Get the data schema url of CloudEvents envelope.
|
String |
ceEnvelopeSchemaName()
Construct the name of the schema of CloudEvents envelope.
|
abstract String |
ceId()
Construct the id of CloudEvents envelope.
|
String |
ceSource(String logicalName)
Construct the source field of CloudEvents envelope, e.g.
|
String |
ceSpecversion()
Get the version of CloudEvents specification.
|
String |
ceTime()
Get the timestamp of CloudEvents envelope using the format defined in RFC 3339.
|
String |
ceType()
Construct the type field of CloudEvents envelope.
|
static CloudEventsMaker |
create(RecordParser parser,
SerializerType contentType)
Create a concrete CloudEvents maker using the outputs of a record parser.
|
static CloudEventsMaker |
create(RecordParser parser,
SerializerType contentType,
String dataSchemaUriBase)
Create a concrete CloudEvents maker using the outputs of a record parser.
|
private static final String SCHEMA_URL_PATH
public static final String CLOUDEVENTS_SPECVERSION
private final SerializerType dataContentType
private final String dataSchemaUriBase
private final org.apache.kafka.connect.data.Schema ceDataAttributeSchema
protected final RecordParser recordParser
static final Map<SerializerType,String> CONTENT_TYPE_NAME_MAP
private CloudEventsMaker(RecordParser parser, SerializerType contentType, String dataSchemaUriBase)
public static CloudEventsMaker create(RecordParser parser, SerializerType contentType, String dataSchemaUriBase)
parser - the parser of a change recordcontentType - the data content type of CloudEventsdataSchemaUriBase - the URI of the schema in case of Avro; may be nullpublic static CloudEventsMaker create(RecordParser parser, SerializerType contentType)
parser - the parser of a change recordcontentType - the data content type of CloudEventspublic abstract String ceId()
public String ceSource(String logicalName)
public String ceSpecversion()
public String ceType()
public String ceDatacontenttype()
public String ceDataschemaUri(String schemaId)
public String ceTime()
public org.apache.kafka.connect.data.Schema ceDataAttributeSchema()
public org.apache.kafka.connect.data.Struct ceDataAttribute()
public String ceEnvelopeSchemaName()
Copyright © 2021 JBoss by Red Hat. All rights reserved.