Class TenantNotResolvedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.common.AxonNonTransientException
io.axoniq.framework.messaging.multitenancy.api.TenantNotResolvedException
- All Implemented Interfaces:
Serializable
Exception thrown when no tenant can be established for a message or an operation.
- Since:
- 4.6.0
- Author:
- Stefan Dragisic, Jan Galinski
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTenantNotResolvedException(String message, Object... args) Construct aTenantNotResolvedException. -
Method Summary
Modifier and TypeMethodDescriptionstatic TenantNotResolvedExceptionforTenantId(String tenantId) Construct aTenantNotResolvedExceptionreferring to the giventenantId.static Supplier<TenantNotResolvedException> tenantNotResolved(String message, Object... args) Returns aSupplierthat creates a newTenantNotResolvedExceptionwith the given message and arguments, useful in lambda expressions or method references.Methods inherited from class org.axonframework.common.AxonNonTransientException
isCauseOfMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TenantNotResolvedException
Construct aTenantNotResolvedException.- Parameters:
message- the message (template) for the exceptionargs- the arguments for the message template
-
-
Method Details
-
tenantNotResolved
public static Supplier<TenantNotResolvedException> tenantNotResolved(String message, Object... args) Returns aSupplierthat creates a newTenantNotResolvedExceptionwith the given message and arguments, useful in lambda expressions or method references.- Parameters:
message- the message (template) for the exceptionargs- the arguments for the message template- Returns:
- a
Supplierthat creates a newTenantNotResolvedExceptionwith the given message and arguments
-
forTenantId
Construct aTenantNotResolvedExceptionreferring to the giventenantId.- Parameters:
tenantId- the tenant identifier that could not be resolved- Returns:
- a
TenantNotResolvedExceptionwith a message indicating the tenant is unknown
-