@FunctionalInterface public interface DuplicateQueryHandlerResolver
MessageHandlerinstances and returns a list with the wanted handlers
|Modifier and Type||Method and Description|
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 detected
MessageHandlerinstances already registered with the Query Bus
MessageHandlerthat is newly registered and conflicts with the existing registrations
MessageHandlerinstances. It is up to the implementation to discard implementations already in the list
RuntimeException- when registration should fail
Copyright © 2010–2022. All rights reserved.