1 /* 2 * Copyright 2002-2014 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.springframework.jms.listener; 18 19 import org.springframework.context.SmartLifecycle; 20 import org.springframework.jms.support.converter.MessageConverter; 21 22 /** 23 * Internal abstraction used by the framework representing a message 24 * listener container. Not meant to be implemented externally with 25 * support for both JMS and JCA style containers. 26 * 27 * @author Stephane Nicoll 28 * @since 4.1 29 */ 30 public interface MessageListenerContainer extends SmartLifecycle { 31 32 /** 33 * Setup the message listener to use. Throws an {@link IllegalArgumentException} 34 * if that message listener type is not supported. 35 */ 36 void setupMessageListener(Object messageListener); 37 38 /** 39 * Return the {@link MessageConverter} that can be used to 40 * convert {@link javax.jms.Message}, if any. 41 */ 42 MessageConverter getMessageConverter(); 43 44 /** 45 * Return whether the Publish/Subscribe domain ({@link javax.jms.Topic Topics}) is used. 46 * Otherwise, the Point-to-Point domain ({@link javax.jms.Queue Queues}) is used. 47 */ 48 boolean isPubSubDomain(); 49 50 }