Package io.vertx.kafka.client.common
Class ConfigResource
- java.lang.Object
-
- io.vertx.kafka.client.common.ConfigResource
-
public class ConfigResource extends Object
A class representing resources that have configuration
-
-
Constructor Summary
Constructors Constructor Description ConfigResource()
ConstructorConfigResource(JsonObject json)
Constructor (from JSON representation)ConfigResource(org.apache.kafka.common.config.ConfigResource.Type type, String name)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getName()
org.apache.kafka.common.config.ConfigResource.Type
getType()
int
hashCode()
boolean
isDefault()
ConfigResource
setDefault(boolean isDefault)
Set if this is the default resource of a resource type.ConfigResource
setName(String name)
Set the resource nameConfigResource
setType(org.apache.kafka.common.config.ConfigResource.Type type)
Set the resource typeJsonObject
toJson()
Convert object to JSON representationString
toString()
-
-
-
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 typename
- 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
-
-