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 EJBProxyFactory interface. Although some
31: * implementations of the ProxyFactory 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 EJBProxyFactory
37: *
38: * @author <a href="mailto:docodan@mvcsoft.com">Daniel OConnor</a>
39: * @version $Revision: 57209 $
40: */
41: public interface LocalProxyFactory extends GenericEntityObjectFactory,
42: ContainerPlugin {
43: /**
44: * This method is called whenever the EJBLocalHome implementation for this
45: * container is needed.
46: *
47: * @return an implementation of the local home interface for this
48: * container
49: */
50: EJBLocalHome getEJBLocalHome();
51:
52: /**
53: * This method is called whenever an EJBLocalObject implementation for a
54: * stateless session bean is needed.
55: *
56: * @return an implementation of the local interface for this container
57: */
58: EJBLocalObject getStatelessSessionEJBLocalObject();
59:
60: /**
61: * This method is called whenever an EJBLocalObject implementation for a
62: * stateful session bean is needed.
63: *
64: * @param id the id of the session
65: * @return an implementation of the local interface for this container
66: */
67: EJBLocalObject getStatefulSessionEJBLocalObject(Object id);
68:
69: /**
70: * This method is called whenever an EJBLocalObject implementation for an
71: * entitybean is needed.
72: *
73: * @param id the primary key of the entity
74: * @return an implementation of the local interface for this container
75: */
76: EJBLocalObject getEntityEJBLocalObject(Object id);
77:
78: /**
79: * This method is called whenever a new EJBLocalObject should be created.
80: * Called when the instance is created.
81: *
82: * @param id the primary key of the entity
83: * @return an implementation of the local interface for this container
84: */
85: EJBLocalObject getEntityEJBLocalObject(Object id, boolean create);
86:
87: /**
88: * This method is called whenever a collection of EJBLocalObjects for a
89: * collection of primary keys is needed.
90: *
91: * @param collection enumeration of primary keys
92: * @return a collection of EJBLocalObjects implementing the remote
93: * interface for this container
94: */
95: Collection getEntityLocalCollection(Collection collection);
96: }
|