1 /**
2 * Copyright 2005-2006 the original author or authors.
3 *
4 * Licensed under the Gnu General Pubic License, Version 2.0 (the
5 * "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/gpl-license.php
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the Gnu General Public License for more details.
14 */
15 package org.figure8.join.core.messaging;
16
17 import javax.jms.MessageListener;
18 /**
19 * This is just an interface extension that allows message listeners
20 * to be notify of container destruction via the <code>stop()</code>
21 * method. <br/>
22 * Moreover, consumers should be identifier using a name (typically,
23 * this name will be from the one provided into {@link JMSConsumerBeanInfo}).
24 *
25 * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
26 * @version $Revision: 1.3 $
27 */
28 public interface JMSConsumerBean extends MessageListener{
29
30
31
32 /**
33 * Retrieve the name of this consumer.
34 * @return The name identifying this consumer
35 */
36 public abstract String getName();
37
38 /**
39 * Set the name identifying this consumer.
40 * @param name The name of this consumer
41 */
42 public abstract void setName(String name);
43
44 /**
45 * Implement this method to stop current process and free resources.
46 * This method should not throw exceptions.
47 */
48 public abstract void stop();
49 }