Package io.debezium.metadata
Class ComponentDescriptor
java.lang.Object
io.debezium.metadata.ComponentDescriptor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringMapping of Kafka Connect interface names to component type identifiers.private static final Stringprivate static final Stringprivate final Stringprivate final Stringprivate final Stringprivate static final org.slf4j.Loggerprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final Stringprivate static final Stringprivate final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionComponentDescriptor(String className, String version) ComponentDescriptor(String className, String displayName, String version) ComponentDescriptor(String className, String displayName, String description, String version) privateComponentDescriptor(String id, String displayName, String description, String className, String version, String type) -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringdetermineComponentType(String className) Determines the component type by checking which Kafka Connect interface the class implements.private static StringdetermineComponentTypeByName(String className) Fallback method that determines component type based on class name patterns.booleangetId()getType()inthashCode()private static booleanisAssignableFrom(Class<?> componentClass, String interfaceClassName) Checks if the given class is assignable from the specified interface/class name.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SINK_CONNECTOR_TYPE
- See Also:
-
SERVER_SINK_TYPE
- See Also:
-
SOURCE_CONNECTOR_TYPE
- See Also:
-
TRANSFORMATION_TYPE
- See Also:
-
PREDICATE_TYPE
- See Also:
-
CONVERTER_TYPE
- See Also:
-
CUSTOM_CONVERTER_TYPE
- See Also:
-
UNKNOWN_TYPE
- See Also:
-
COMPONENT_TYPE_MAPPINGS
Mapping of Kafka Connect interface names to component type identifiers. Checked in order, so more specific types should come first. -
id
-
displayName
-
description
-
className
-
version
-
type
-
-
Constructor Details
-
ComponentDescriptor
-
ComponentDescriptor
-
ComponentDescriptor
-
ComponentDescriptor
-
-
Method Details
-
getId
-
getDisplayName
-
getDescription
-
getClassName
-
getVersion
-
getType
-
determineComponentType
Determines the component type by checking which Kafka Connect interface the class implements. This is more reliable than string matching on class names.- Parameters:
className- the fully qualified class name- Returns:
- the component type: "source-connector", "sink-connector", "transformation", "predicate", or "unknown"
-
determineComponentTypeByName
Fallback method that determines component type based on class name patterns. Used when the class cannot be loaded via reflection.Debezium naming convention: Classes ending in "Connector" (without "Sink" prefix) are source connectors by default.
-
isAssignableFrom
Checks if the given class is assignable from the specified interface/class name. Returns false if the interface class cannot be loaded. -
equals
-
hashCode
public int hashCode()
-