Example usage for org.springframework.jms.config AbstractJmsListenerEndpoint getDestination

List of usage examples for org.springframework.jms.config AbstractJmsListenerEndpoint getDestination

Introduction

In this page you can find the example usage for org.springframework.jms.config AbstractJmsListenerEndpoint getDestination.

Prototype

@Nullable
public String getDestination() 

Source Link

Document

Return the name of the destination for this endpoint.

Usage

From source file:com.kinglcc.spring.jms.core.listener.DynamicJmsListenerContainerFactory.java

@Override
public DefaultMessageListenerContainer createListenerContainer(JmsListenerEndpoint endpoint) {
    DefaultMessageListenerContainer instance = super.createListenerContainer(endpoint);
    instance.setClientId(resolveClientId(endpoint));
    if (endpoint instanceof AbstractJmsListenerEndpoint) {
        AbstractJmsListenerEndpoint jmsEndpoint = ((AbstractJmsListenerEndpoint) endpoint);
        DestinationType destinationType = DestinationType.asDestinationType(jmsEndpoint.getDestination());
        instance.setPubSubDomain(destinationType.isPubSubDomain());
        instance.setSubscriptionDurable(destinationType.isSubscriptionDurable());
        instance.setSubscriptionShared(destinationType.isSubscriptionShared());
    }//from   w  w w  .  j  a  v a2s .  c o m
    endpoint.setupListenerContainer(instance);

    return instance;
}