Class ConfigResource


  • public class ConfigResource
    extends Object
    A class representing resources that have configuration
    • Constructor Detail

      • ConfigResource

        public ConfigResource()
        Constructor
      • ConfigResource

        public ConfigResource​(org.apache.kafka.common.config.ConfigResource.Type type,
                              String name)
        Constructor
        Parameters:
        type - a non-null resource type
        name - a non-null resource name
      • ConfigResource

        public ConfigResource​(JsonObject json)
        Constructor (from JSON representation)
        Parameters:
        json - JSON representation
    • Method Detail

      • getName

        public String getName()
        Returns:
        the resource name
      • setName

        public ConfigResource setName​(String name)
        Set the resource name
        Parameters:
        name - the resource name
        Returns:
        current instance of the class to be fluent
      • isDefault

        public boolean isDefault()
        Returns:
        true if this is the default resource of a resource type. Resource name is empty for the default resource.
      • setDefault

        public ConfigResource setDefault​(boolean isDefault)
        Set if this is the default resource of a resource type. Resource name is empty for the default resource.
        Parameters:
        isDefault - if this is the default resource of a resource type
        Returns:
        current instance of the class to be fluent
      • getType

        public org.apache.kafka.common.config.ConfigResource.Type getType()
        Returns:
        the resource type
      • setType

        public ConfigResource setType​(org.apache.kafka.common.config.ConfigResource.Type type)
        Set the resource type
        Parameters:
        type - the resource type
        Returns:
        current instance of the class to be fluent
      • toJson

        public JsonObject toJson()
        Convert object to JSON representation
        Returns:
        JSON representation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object