KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb > LocalProxyFactory


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 JavaDoc;
25
26 import javax.ejb.EJBLocalHome JavaDoc;
27 import javax.ejb.EJBLocalObject JavaDoc;
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: 37459 $
40  */

41 public interface LocalProxyFactory
42    extends GenericEntityObjectFactory, 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 JavaDoc 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 JavaDoc 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 JavaDoc getStatefulSessionEJBLocalObject(Object JavaDoc 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 JavaDoc getEntityEJBLocalObject(Object JavaDoc id);
78
79    /**
80     * This method is called whenever a new EJBLocalObject should be created.
81     * Called when the instance is created.
82     *
83     * @param id the primary key of the entity
84     * @return an implementation of the local interface for this container
85     */

86    EJBLocalObject JavaDoc getEntityEJBLocalObject(Object JavaDoc id, boolean create);
87
88    /**
89     * This method is called whenever a collection of EJBLocalObjects for a
90     * collection of primary keys is needed.
91     *
92     * @param c collection of primary keys
93     * @return a collection of EJBLocalObjects implementing the remote
94     * interface for this container
95     */

96    Collection JavaDoc getEntityLocalCollection(Collection JavaDoc c);
97 }
98
Popular Tags