View Javadoc
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.config;
18  
19  import org.springframework.jms.listener.MessageListenerContainer;
20  
21  /**
22   * Model for a JMS listener endpoint. Can be used against a
23   * {@link org.springframework.jms.annotation.JmsListenerConfigurer
24   * JmsListenerConfigurer} to register endpoints programmatically.
25   *
26   * @author Stephane Nicoll
27   * @since 4.1
28   */
29  public interface JmsListenerEndpoint {
30  
31  	/**
32  	 * Return the id of this endpoint.
33  	 */
34  	String getId();
35  
36  	/**
37  	 * Setup the specified message listener container with the model
38  	 * defined by this endpoint.
39  	 * <p>This endpoint must provide the requested missing option(s) of
40  	 * the specified container to make it usable. Usually, this is about
41  	 * setting the {@code destination} and the {@code messageListener} to
42  	 * use but an implementation may override any default setting that
43  	 * was already set.
44  	 * @param listenerContainer the listener container to configure
45  	 */
46  	void setupListenerContainer(MessageListenerContainer listenerContainer);
47  
48  }