@FunctionalInterface public interface DuplicateQueryHandlerResolver
MessageHandler
instances and returns a list with the wanted handlersModifier and Type | Method and Description |
---|---|
List<QuerySubscription<?>> |
resolve(String queryName,
Type responseType,
List<QuerySubscription<?>> registeredHandlers,
QuerySubscription<?> candidateHandler)
Chooses what to do when a duplicate handler is registered, returning the handlers that should be selected for
query handling, or otherwise throwing an exception to reject registration altogether.
|
List<QuerySubscription<?>> resolve(String queryName, Type responseType, List<QuerySubscription<?>> registeredHandlers, QuerySubscription<?> candidateHandler)
queryName
- The name of the query for which the duplicate was detectedregisteredHandlers
- the MessageHandler
instances already registered with the Query BuscandidateHandler
- the MessageHandler
that is newly registered and conflicts with the existing
registrationsMessageHandler
instances. It is up to the implementation to discard implementations
already in the listRuntimeException
- when registration should failCopyright © 2010–2023. All rights reserved.