01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the License). You may not use this file except in
05: * compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://glassfish.dev.java.net/public/CDDLv1.0.html or
09: * glassfish/bootstrap/legal/CDDLv1.0.txt.
10: * See the License for the specific language governing
11: * permissions and limitations under the License.
12: *
13: * When distributing Covered Code, include this CDDL
14: * Header Notice in each file and include the License file
15: * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16: * If applicable, add the following below the CDDL Header,
17: * with the fields enclosed by brackets [] replaced by
18: * you own identifying information:
19: * "Portions Copyrighted [year] [name of copyright owner]"
20: *
21: * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22: */
23:
24: package javax.jms;
25:
26: /**
27: * A <CODE>MessageListener</CODE> object is used to receive asynchronously
28: * delivered messages.
29: *
30: * <P>
31: * Each session must insure that it passes messages serially to the listener.
32: * This means that a listener assigned to one or more consumers of the same
33: * session can assume that the <CODE>onMessage</CODE> method is not called
34: * with the next message until the session has completed the last call.
35: *
36: * @version 1.0 - 13 March 1998
37: * @author Mark Hapner
38: * @author Rich Burridge
39: */
40:
41: public interface MessageListener {
42:
43: /**
44: * Passes a message to the listener.
45: *
46: * @param message
47: * the message passed to the listener
48: */
49:
50: void onMessage(Message message);
51: }
|