1 /* 2 * The contents of this file are subject to the terms 3 * of the Common Development and Distribution License 4 * (the License). You may not use this file except in 5 * compliance with the License. 6 * 7 * You can obtain a copy of the license at 8 * https://glassfish.dev.java.net/public/CDDLv1.0.html or 9 * 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 25 package com.sun.ejb; 26 27 import java.lang.NoSuchMethodException; 28 import java.lang.reflect.Method; 29 30 /* 31 * MessageBeanClient is an interface implemented by clients 32 * of the MessageBeanContainer. It contains lifecycle methods 33 * that allow the container to bootstrap the MessageBeanClient. 34 * A MessageBeanClient is some part of the container that needs 35 * to deliver messages to a message-driven bean. 36 * 37 * @author Kenneth Saks 38 */ 39 public interface MessageBeanClient { 40 41 /** 42 * First method called by MessageBeanContainer during bootstrapping. 43 * Allow the MessageBeanClient to initialize itself. Message delivery 44 * should not begin until start is called. 45 * 46 * @param pm MessageBeanProtocolManager allows the MessageBeanClient to 47 * access the services provided by the MessageBeanContainer. 48 */ 49 void setup(MessageBeanProtocolManager pm) throws Exception; 50 51 /** 52 * MessageBeanContainer calls this when it is ready handle message delivery. 53 */ 54 void start() throws Exception; 55 56 /** 57 * MessageBeanContainer calls this to shutdown MessageBeanClient. 58 */ 59 void close(); 60 61 } 62