1 /* 2 * JBoss, Home of Professional Open Source 3 * Copyright 2005, JBoss Inc., and individual contributors as indicated 4 * by the @authors tag. See the copyright.txt in the distribution for a 5 * full listing of individual contributors. 6 * 7 * This is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU Lesser General Public License as 9 * published by the Free Software Foundation; either version 2.1 of 10 * the License, or (at your option) any later version. 11 * 12 * This software is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this software; if not, write to the Free 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 */ 22 package org.jboss.ejb; 23 24 import java.util.Collection; 25 26 import javax.ejb.EJBLocalHome; 27 import javax.ejb.EJBLocalObject; 28 29 /** 30 * This is an extension to the ContainerInvoker interface. Although some 31 * implementations of the ContainerInvoker interface may provide access 32 * to local interfaces, others (e.g. which provide remote distribution) 33 * will not. Good example: the JRMP delegates do not need to implement 34 * this interface. 35 * 36 * @see ContainerInvoker 37 * 38 * @author <a HREF="mailto:docodan@mvcsoft.com">Daniel OConnor</a> 39 * @version $Revision: 37459 $ 40 */ 41 public interface LocalContainerInvoker 42 extends ContainerPlugin 43 { 44 /** 45 * This method is called whenever the EJBLocalHome implementation for this 46 * container is needed. 47 * 48 * @return an implementation of the local home interface for this 49 * container 50 */ 51 EJBLocalHome getEJBLocalHome(); 52 53 /** 54 * This method is called whenever an EJBLocalObject implementation for a 55 * stateless session bean is needed. 56 * 57 * @return an implementation of the local interface for this container 58 */ 59 EJBLocalObject getStatelessSessionEJBLocalObject(); 60 61 /** 62 * This method is called whenever an EJBLocalObject implementation for a 63 * stateful session bean is needed. 64 * 65 * @param id the id of the session 66 * @return an implementation of the local interface for this container 67 */ 68 EJBLocalObject getStatefulSessionEJBLocalObject(Object id); 69 70 /** 71 * This method is called whenever an EJBLocalObject implementation for an 72 * entitybean is needed. 73 * 74 * @param id the primary key of the entity 75 * @return an implementation of the local interface for this container 76 */ 77 EJBLocalObject getEntityEJBLocalObject(Object id); 78 79 /** 80 * This method is called whenever a collection of EJBLocalObjects for a 81 * collection of primary keys is needed. 82 * 83 * @param c collection of primary keys 84 * @return a collection of EJBLocalObjects implementing the remote 85 * interface for this container 86 */ 87 Collection getEntityLocalCollection(Collection c); 88 } 89