Expose JMS message listener container ids
Issue: SPR-13633
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.jms.config;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
@@ -68,12 +69,21 @@ public class JmsListenerEndpointRegistry implements DisposableBean, SmartLifecyc
|
||||
* @param id the id of the container
|
||||
* @return the container or {@code null} if no container with that id exists
|
||||
* @see JmsListenerEndpoint#getId()
|
||||
* @see #getListenerContainerIds()
|
||||
*/
|
||||
public MessageListenerContainer getListenerContainer(String id) {
|
||||
Assert.notNull(id, "Container identifier must not be null");
|
||||
return this.listenerContainers.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ids of the managed {@link MessageListenerContainer} instance(s).
|
||||
* @see #getListenerContainer(String)
|
||||
*/
|
||||
public Set<String> getListenerContainerIds() {
|
||||
return Collections.unmodifiableSet(this.listenerContainers.keySet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the managed {@link MessageListenerContainer} instance(s).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user