Class NoHandlerForQueryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.messaging.queryhandling.NoHandlerForQueryException
- All Implemented Interfaces:
Serializable
Exception indicating this instance has no
QueryHandler for a given QueryMessage.- Since:
- 3.1.0
- Author:
- Marc Gathier
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoHandlerForQueryException(String message) Initialize this exception with the givenmessage. -
Method Summary
Modifier and TypeMethodDescriptionstatic NoHandlerForQueryExceptionforBus(QueryMessage query) Constructs aNoHandlerForQueryExceptionwith a message describing the givenQueryMessage, specific forQueryBuses.static NoHandlerForQueryExceptionforHandlingComponent(QueryMessage query) Constructs aNoHandlerForQueryExceptionwith a message describing the givenQueryMessage, specific forQueryHandlingComponents.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NoHandlerForQueryException
Initialize this exception with the givenmessage.- Parameters:
message- The message describing the cause of the exception.
-
-
Method Details
-
forBus
Constructs aNoHandlerForQueryExceptionwith a message describing the givenQueryMessage, specific forQueryBuses.- Parameters:
query- Thequeryfor which no handler was found.- Returns:
- A
NoHandlerForQueryExceptionwith a message describing the givenQueryMessage, specific forQueryBuses.
-
forHandlingComponent
Constructs aNoHandlerForQueryExceptionwith a message describing the givenQueryMessage, specific forQueryHandlingComponents.This factory method specifies in its message that missing parameters could be the culprit of finding a matching handler.
- Parameters:
query- Thequeryfor which no handler was found.- Returns:
- A
NoHandlerForQueryExceptionwith a message describing the givenQueryMessage, specific forQueryHandlingComponents.
-