1 /*2 * JBoss, the OpenSource J2EE webOS3 *4 * Distributable under LGPL license.5 * See terms of license at gnu.org.6 */7 package org.jboss.jms.client;8 9 import javax.jms.JMSException ;10 import javax.jms.Message ;11 import javax.jms.MessageListener ;12 13 /**14 * The implementation of a consumer15 * 16 * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>17 * @version $Revision: 1.2 $18 */19 public interface ConsumerDelegate20 extends Lifecycle 21 {22 // Constants -----------------------------------------------------23 24 // Public --------------------------------------------------------25 26 /**27 * Receive a message28 * 29 * @param timeout the timeout30 * @return the message31 * @throws JMSException for any error32 */33 Message receive(long timeout) throws JMSException ;34 35 /**36 *37 * Set the message listener38 * @param the new message listener39 * @throws JMSException for any error 40 */41 void setMessageListener(MessageListener listener) throws JMSException ;42 43 // Inner Classes --------------------------------------------------44 }45