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 allMessageListenerContainer
instances including those managed by this registry and those declared as beans in the application context.Return theMessageListenerContainer
with the specified id ornull
if no such container exists.Return the ids of the managedMessageListenerContainer
instance(s).Return the managedMessageListenerContainer
instance(s).getListenerContainersMatching
(BiPredicate<String, MessageListenerContainer> idAndContainerMatcher) Return allMessageListenerContainer
instances that satisfy the given bi-predicate.getListenerContainersMatching
(Predicate<String> idMatcher) Return allMessageListenerContainer
instances with id matching the predicate or emptyCollection
if no such container exists.Return theMessageListenerContainer
with the specified id ornull
if no such container exists.
-
Method Details
-
getListenerContainer
Return theMessageListenerContainer
with the specified id ornull
if no such container exists.- Parameters:
id
- the id of the container- Returns:
- the container or
null
if no container with that id exists - See Also:
-
getListenerContainersMatching
Return allMessageListenerContainer
instances with id matching the predicate or emptyCollection
if no such container exists.- Parameters:
idMatcher
- the predicate to match the container id with- Returns:
- the containers or empty
Collection
if no container with that id exists - Since:
- 3.2
- See Also:
-
getListenerContainersMatching
Collection<MessageListenerContainer> getListenerContainersMatching(BiPredicate<String, MessageListenerContainer> idAndContainerMatcher) Return allMessageListenerContainer
instances 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
Collection
if no matching containers exist - Since:
- 3.2
- See Also:
-
getUnregisteredListenerContainer
Return theMessageListenerContainer
with the specified id ornull
if 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
null
if no container with that id exists - See Also:
-
getListenerContainerIds
Return the ids of the managedMessageListenerContainer
instance(s).- Returns:
- the ids.
- See Also:
-
getListenerContainers
Collection<MessageListenerContainer> getListenerContainers()Return the managedMessageListenerContainer
instance(s).- Returns:
- the managed
MessageListenerContainer
instance(s). - See Also:
-
getAllListenerContainers
Collection<MessageListenerContainer> getAllListenerContainers()Return allMessageListenerContainer
instances 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
MessageListenerContainer
instance(s). - See Also:
-