KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > web > 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.web;
25
26 import com.sun.enterprise.deployment.RunAsIdentityDescriptor;
27 import com.sun.enterprise.deployment.BundleDescriptor;
28
29 /**
30  * Specialization of ContextParameter that represents a link to an EJB.
31  * @author Danny Coward
32  */

33
34 public interface EjbReference extends ContextParameter {
35     
36     /**
37      * Get the type of the EJB (Session, Entity or Message-Driven).
38      * @return the type of the EJB.
39      */

40     public String JavaDoc getType();
41
42     /**
43      * Set the type of the EJB. Allowed values are Session, Entity or
44      * Message-driven.
45      * @param the type of the EJB.
46      */

47     public void setType(String JavaDoc type);
48
49     /**
50      * Gets the home classname of the referee EJB.
51      * @return the class name of the EJB home.
52      */

53     public String JavaDoc getHomeClassName();
54
55     /**
56      * Sets the home classname of the referee EJB.
57      * @param the class name of the EJB home.
58      */

59     public void setHomeClassName(String JavaDoc homeClassName);
60
61     /**
62      * Gets the bean instance interface classname of the referee EJB.
63      * @return the classname of the EJB remote object.
64      */

65     public String JavaDoc getBeanClassName();
66
67     /**
68      * Sets the bean interface classname of the referee EJB.
69      * @param the classname of the EJB remote object.
70      */

71     public void setBeanClassName(String JavaDoc beanClassName);
72     
73     /**
74      * Gets the link name of the reference. For use when linking to an EJB
75      * within a J2EE application.
76      * @return the link name.
77      */

78     public String JavaDoc getLinkName();
79
80     /**
81      * Sets the link name of the reference. For use when linking to an EJB
82      * within a J2EE application.
83      * @param the link name.
84      */

85     public void setLinkName(String JavaDoc linkName);
86     
87     /**
88      * Tests if the reference to the referree EJB is through local or
89      * remote interface
90      * @return true if using the local interfaces
91      */

92     public boolean isLocal();
93     
94     /**
95      * Sets whether the reference uses the local or remote interfaces of
96      * the referring EJB
97      * @param true if using the local interface
98      */

99     public void setLocal(boolean isLocal);
100  
101     /**
102      * Set the referring bundle, i.e. the bundle within which this
103      * EJB reference is declared.
104      */

105     public void setReferringBundleDescriptor(BundleDescriptor referringBundle);
106
107     /**
108      * Get the referring bundle, i.e. the bundle within which this
109      * EJB reference is declared.
110      */

111     public BundleDescriptor getReferringBundleDescriptor();
112 }
113
Popular Tags