Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
package org.apache.kafka.connect.components;  
  
import org.apache.kafka.common.config.ConfigDef;  
  
/**  
* Interface for components that provide configuration specifications. 
* This interface establishes a common contract for all Kafka Connect components 
* that expose configurable properties, enabling uniform discovery and introspection 
* of component configurations. 
* 
* <p>Components implementing this interface declare their configuration requirements 
* through a {@link ConfigDef} object, which describes the configuration properties 
* including their names, types, default values, validators, and documentation. 
  
* 
*/

public interface ConfigSpecifier {  
  
	/**     
	* Returns the configuration specification for this component.     
	*     
	* <p>The returned {@link ConfigDef} object describes all configuration properties     
	* that this component accepts, including their types, default values, validators,     
	* importance levels, and documentation strings.     
	*     
	* @return the configuration definition for this component; never null     
	*/    

	ConfigDef config();
}   


The following existing interfaces will be modified to extend ConfigSpecifier:  
  

Code Block
languagejava
titleConnector
public abstract class Connector implements Versioned, ConfigSpecifier {  
  
    /**     
    * Define the configuration for the connector.     
    * @return The ConfigDef for this connector; may not be null.     
    */    
    
    @Override    
    public abstract ConfigDef config();
}   


Code Block
languagejava
titleConverter
public interface Converter extends Closeable, ConfigSpecifier {  
  
    /**     
    * Configuration specification for this converter.     
    * @return the configuration specification; may not be null     
    */    
    
    @Override    
    default ConfigDef config() { return new ConfigDef();}
}  


Code Block
languagejava
titleHeaderConverter
public interface 

...

HeaderConverter extends Configurable, Closeable, ConfigSpecifier {

...


...


    

...

/**
  

...

 

...

 

...

 * Configuration specification for this 

...

set of header converters.
     * @return the configuration specification; may not be null
  

...

 

...

 

...

 */

...


	@Override
    ConfigDef config()

...

;
}



 

Code Block
languagejava
titleTransformation
public interface Transformation<R extends ConnectRecord<R>> extends Configurable, Closeable, ConfigSpecifier {  
  
    /** Configuration specification for this transformation. 
    */    
    
    @Override    
    ConfigDef config();
}   


Code Block
languagejava
titlePredicate
public interface Predicate<R extends ConnectRecord<R>> extends Configurable, AutoCloseable, ConfigSpecifier {  
  
    /**     
    * Configuration specification for this predicate.     
    *     
    * @return the configuration definition for this predicate; never null     
    */    
    
    @Override    
    ConfigDef config();
}   


Proposed Changes

Implementation Plan  

...