01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * 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: 57209 $
40: */
41: public interface LocalContainerInvoker extends ContainerPlugin {
42: /**
43: * This method is called whenever the EJBLocalHome implementation for this
44: * container is needed.
45: *
46: * @return an implementation of the local home interface for this
47: * container
48: */
49: EJBLocalHome getEJBLocalHome();
50:
51: /**
52: * This method is called whenever an EJBLocalObject implementation for a
53: * stateless session bean is needed.
54: *
55: * @return an implementation of the local interface for this container
56: */
57: EJBLocalObject getStatelessSessionEJBLocalObject();
58:
59: /**
60: * This method is called whenever an EJBLocalObject implementation for a
61: * stateful session bean is needed.
62: *
63: * @param id the id of the session
64: * @return an implementation of the local interface for this container
65: */
66: EJBLocalObject getStatefulSessionEJBLocalObject(Object id);
67:
68: /**
69: * This method is called whenever an EJBLocalObject implementation for an
70: * entitybean is needed.
71: *
72: * @param id the primary key of the entity
73: * @return an implementation of the local interface for this container
74: */
75: EJBLocalObject getEntityEJBLocalObject(Object id);
76:
77: /**
78: * This method is called whenever a collection of EJBLocalObjects for a
79: * collection of primary keys is needed.
80: *
81: * @param collection enumeration of primary keys
82: * @return a collection of EJBLocalObjects implementing the remote
83: * interface for this container
84: */
85: Collection getEntityLocalCollection(Collection collection);
86: }
|