01: /*
02: * @(#)MessageListener.java 1.14 02/04/09
03: *
04: * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * SUN PROPRIETARY/CONFIDENTIAL.
07: * This software is the proprietary information of Sun Microsystems, Inc.
08: * Use is subject to license terms.
09: *
10: */
11:
12: package javax.jms;
13:
14: /** A <CODE>MessageListener</CODE> object is used to receive asynchronously
15: * delivered messages.
16: *
17: * <P>Each session must insure that it passes messages serially to the
18: * listener. This means that a listener assigned to one or more consumers
19: * of the same session can assume that the <CODE>onMessage</CODE> method
20: * is not called with the next message until the session has completed the
21: * last call.
22: *
23: * @version 1.0 - 13 March 1998
24: * @author Mark Hapner
25: * @author Rich Burridge
26: */
27:
28: public interface MessageListener {
29:
30: /** Passes a message to the listener.
31: *
32: * @param message the message passed to the listener
33: */
34:
35: void onMessage(Message message);
36: }
|