Interface ListenerContainerRegistry
- All Known Implementing Classes:
KafkaListenerEndpointRegistry
public interface ListenerContainerRegistry
A registry for listener containers.
- Since:
- 2.7
- Author:
- Gary Russell, Joo Hyuk Kim
-
Method Summary
Modifier and TypeMethodDescriptionReturn allMessageListenerContainerinstances including those managed by this registry and those declared as beans in the application context.@Nullable MessageListenerContainerReturn theMessageListenerContainerwith the specified id ornullif no such container exists.Return the ids of the managedMessageListenerContainerinstance(s).Return the managedMessageListenerContainerinstance(s).getListenerContainersMatching(BiPredicate<String, MessageListenerContainer> idAndContainerMatcher) Return allMessageListenerContainerinstances that satisfy the given bi-predicate.getListenerContainersMatching(Predicate<String> idMatcher) Return allMessageListenerContainerinstances with id matching the predicate or emptyCollectionif no such container exists.@Nullable MessageListenerContainerReturn theMessageListenerContainerwith the specified id ornullif no such container exists.
-
Method Details
-
getListenerContainer
Return theMessageListenerContainerwith the specified id ornullif no such container exists.- Parameters:
id- the id of the container- Returns:
- the container or
nullif no container with that id exists - See Also:
-
getListenerContainersMatching
Return allMessageListenerContainerinstances with id matching the predicate or emptyCollectionif no such container exists.- Parameters:
idMatcher- the predicate to match the container id with- Returns:
- the containers or empty
Collectionif no container with that id exists - Since:
- 3.2
- See Also:
-
getListenerContainersMatching
Collection<MessageListenerContainer> getListenerContainersMatching(BiPredicate<String, MessageListenerContainer> idAndContainerMatcher) Return allMessageListenerContainerinstances that satisfy the given bi-predicate. TheBiPredicate<String, MessageListenerContainer>takes the container id and the container itself as arguments. This allows for more sophisticated filtering, including properties or state of the container itself.- Parameters:
idAndContainerMatcher- the bi-predicate to match the container id and the container- Returns:
- the containers that match the bi-predicate criteria or an empty
Collectionif no matching containers exist - Since:
- 3.2
- See Also:
-
getUnregisteredListenerContainer
Return theMessageListenerContainerwith the specified id ornullif no such container exists. Returns containers that are not registered with the registry, but exist in the application context.- Parameters:
id- the id of the container- Returns:
- the container or
nullif no container with that id exists - See Also:
-
getListenerContainerIds
Return the ids of the managedMessageListenerContainerinstance(s).- Returns:
- the ids.
- See Also:
-
getListenerContainers
Collection<MessageListenerContainer> getListenerContainers()Return the managedMessageListenerContainerinstance(s).- Returns:
- the managed
MessageListenerContainerinstance(s). - See Also:
-
getAllListenerContainers
Collection<MessageListenerContainer> getAllListenerContainers()Return allMessageListenerContainerinstances including those managed by this registry and those declared as beans in the application context. Prototype-scoped containers will be included. Lazy beans that have not yet been created will not be initialized by a call to this method.- Returns:
- the
MessageListenerContainerinstance(s). - See Also:
-