Package org.apache.kafka.common.errors
Class DuplicateResourceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.kafka.common.KafkaException
-
- org.apache.kafka.common.errors.ApiException
-
- org.apache.kafka.common.errors.DuplicateResourceException
-
- All Implemented Interfaces:
Serializable
public class DuplicateResourceException extends ApiException
Exception thrown due to a request that illegally refers to the same resource twice (for example, trying to both create and delete the same SCRAM credential for a particular user in a single request).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DuplicateResourceException(String message)
ConstructorDuplicateResourceException(String resource, String message)
ConstructorDuplicateResourceException(String resource, String message, Throwable cause)
ConstructorDuplicateResourceException(String message, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
resource()
-
Methods inherited from class org.apache.kafka.common.errors.ApiException
fillInStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
DuplicateResourceException
public DuplicateResourceException(String message)
Constructor- Parameters:
message
- the exception's message
-
DuplicateResourceException
public DuplicateResourceException(String message, Throwable cause)
- Parameters:
message
- the exception's messagecause
- the exception's cause
-
DuplicateResourceException
public DuplicateResourceException(String resource, String message)
Constructor- Parameters:
resource
- the (potentially null) resource that was referred to twicemessage
- the exception's message
-
-
Method Detail
-
resource
public String resource()
- Returns:
- the (potentially null) resource that was referred to twice
-
-