KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > types > EjbReference


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 package com.sun.enterprise.deployment.types;
25
26 import com.sun.enterprise.deployment.web.ContextParameter;
27
28 import com.sun.enterprise.deployment.RunAsIdentityDescriptor;
29 import com.sun.enterprise.deployment.InjectionCapable;
30 import com.sun.enterprise.deployment.EjbDescriptor;
31 import com.sun.enterprise.deployment.BundleDescriptor;
32
33 /**
34  * Protocol associated with defining an EJB Interface
35  *
36  * @author Jerome Dochez
37  */

38
39 public interface EjbReference extends NamedInformation, InjectionCapable {
40     
41     /**
42      * Get the type of the EJB (Session, Entity or Message-Driven).
43      * @return the type of the EJB.
44      */

45     public String JavaDoc getType();
46
47     /**
48      * Set the type of the EJB. Allowed values are Session, Entity or
49      * Message-driven.
50      * @param the type of the EJB.
51      */

52     public void setType(String JavaDoc type);
53
54     /**
55      * Gets the home classname of the referee EJB.
56      * @return the class name of the EJB home.
57      */

58     public String JavaDoc getEjbHomeInterface();
59
60     /**
61      * Sets the local or remote home classname of the referee EJB.
62      * @param the class name of the EJB home.
63      */

64     public void setEjbHomeInterface(String JavaDoc ejbHomeInterface);
65
66     /**
67      * Gets the local or remote interface classname of the referee EJB.
68      * @return the classname of the EJB remote object.
69      */

70     public String JavaDoc getEjbInterface();
71
72     /**
73      * Sets the local or remote bean interface classname of the referee EJB.
74      * @param the classname of the EJB remote object.
75      */

76     public void setEjbInterface(String JavaDoc ejbInterface);
77     
78     /**
79      * Gets the link name of the reference. For use when linking to an EJB
80      * within a J2EE application.
81      * @return the link name.
82      */

83     public String JavaDoc getLinkName();
84
85     /**
86      * Sets the link name of the reference. For use when linking to an EJB
87      * within a J2EE application.
88      * @param the link name.
89      */

90     public void setLinkName(String JavaDoc linkName);
91     
92     /**
93      * Tests if the reference to the referree EJB is through local or
94      * remote interface
95      * @return true if using the local interfaces
96      */

97     public boolean isLocal();
98     
99     /**
100      * Sets whether the reference uses the local or remote interfaces of
101      * the referring EJB
102      * @param true if using the local interface
103      */

104     public void setLocal(boolean isLocal);
105  
106     /**
107      * Set the referring bundle, i.e. the bundle within which this
108      * EJB reference is declared.
109      */

110     public void setReferringBundleDescriptor(BundleDescriptor referringBundle);
111
112     /**
113      * Get the referring bundle, i.e. the bundle within which this
114      * EJB reference is declared.
115      */

116     public BundleDescriptor getReferringBundleDescriptor();
117     
118     /**
119      * Set the jndi name for this ejb reference
120      */

121     public void setJndiName(String JavaDoc jndiName);
122     
123     /**
124      * @return the jndi name for this ejb reference
125      */

126     public String JavaDoc getJndiName();
127     
128     public EjbDescriptor getEjbDescriptor();
129     public void setEjbDescriptor(EjbDescriptor descriptor);
130
131     /**
132      * @return true if the EJB reference is a 30 client view
133      */

134     public boolean isEJB30ClientView();
135
136 }
137
138
Popular Tags