KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > annotation > context > ResourceContainerContext


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 package com.sun.enterprise.deployment.annotation.context;
24
25 import com.sun.enterprise.deployment.types.EjbReference;
26 import com.sun.enterprise.deployment.EntityManagerFactoryReferenceDescriptor;
27 import com.sun.enterprise.deployment.EntityManagerReferenceDescriptor;
28 import com.sun.enterprise.deployment.EnvironmentProperty;
29 import com.sun.enterprise.deployment.LifecycleCallbackDescriptor;
30 import com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor;
31 import com.sun.enterprise.deployment.JmsDestinationReferenceDescriptor;
32 import com.sun.enterprise.deployment.ResourceReferenceDescriptor;
33
34 /**
35  * This interface provides an abstraction for handle resource references.
36  *
37  * @Author Shing Wai Chan
38  */

39 public interface ResourceContainerContext extends ServiceReferenceContainerContext {
40     /**
41      * Add a ejb reference.
42      *
43      * @param the ejb reference
44      */

45     public void addEjbReferenceDescriptor(EjbReference ejbReference);
46                                                                                
47     /**
48      * Looks up an ejb reference with the given name.
49      * Return null if it is not found.
50      *
51      * @param the name of the ejb-reference
52      */

53     public EjbReference getEjbReference(String JavaDoc name);
54
55     /**
56      * Add a resource reference
57      *
58      * @param the resource reference
59      */

60     public void addResourceReferenceDescriptor(ResourceReferenceDescriptor
61                                                resReference);
62                                                                                
63     /**
64      * Looks up an resource reference with the given name.
65      * Return null if it is not found.
66      *
67      * @param the name of the resource-reference
68      */

69     public ResourceReferenceDescriptor getResourceReference(String JavaDoc name);
70
71     /**
72      * Add a message-destination-ref
73      *
74      * @param the msgDestRef
75      */

76     public void addMessageDestinationReferenceDescriptor
77         (MessageDestinationReferenceDescriptor msgDestRef);
78                                                
79                                                                                
80     /**
81      * Looks up a message-destination-ref with the given name.
82      * Return null if it is not found.
83      *
84      * @param the name of the message-destination-ref
85      */

86     public MessageDestinationReferenceDescriptor getMessageDestinationReference
87         (String JavaDoc name);
88
89
90    /**
91      * Add a resource-env-ref
92      *
93      * @param the jmsDestRef
94      */

95     public void addJmsDestinationReferenceDescriptor
96         (JmsDestinationReferenceDescriptor jmsDestRef);
97
98
99     /**
100      * Looks up a resource-env-ref with the given name.
101      * Return null if it is not found.
102      *
103      * @param the name of the resource-env-ref
104      */

105     public JmsDestinationReferenceDescriptor getJmsDestinationReference
106         (String JavaDoc name);
107
108     /**
109      * Add an env-entry
110      *
111      * @param the env-entry
112      */

113     public void addEnvEntryDescriptor(EnvironmentProperty envEntry);
114                                                
115                                                                                
116     /**
117      * Looks up an env-entry with the given name.
118      * Return null if it is not found.
119      *
120      * @param the name of the env-entry
121      */

122     public EnvironmentProperty getEnvEntry(String JavaDoc name);
123
124
125     public void addEntityManagerFactoryReferenceDescriptor
126         (EntityManagerFactoryReferenceDescriptor emfRefDesc);
127                                                                                
128     /**
129      * Looks up an entity manager factory reference with the given name.
130      * Return null if it is not found.
131      *
132      * @param the name of the emf reference
133      */

134     public EntityManagerFactoryReferenceDescriptor
135         getEntityManagerFactoryReference(String JavaDoc name);
136
137     public void addEntityManagerReferenceDescriptor
138         (EntityManagerReferenceDescriptor emRefDesc);
139                                                                                
140     /**
141      * Looks up an entity manager reference with the given name.
142      * Return null if it is not found.
143      *
144      * @param the name of the emf reference
145      */

146     public EntityManagerReferenceDescriptor getEntityManagerReference
147         (String JavaDoc name);
148
149    /**
150      * @param postConstructDesc
151      */

152     public void addPostConstructDescriptor(
153             LifecycleCallbackDescriptor postConstructDesc);
154
155     /**
156      * Look up an post-construct LifecycleCallbackDescriptor with the
157      * given name. Return null if it is not found
158      * @param className
159      */

160     public LifecycleCallbackDescriptor getPostConstruct(String JavaDoc className);
161
162    /**
163      * @param preDestroyDesc
164      */

165     public void addPreDestroyDescriptor(
166             LifecycleCallbackDescriptor preDestroyDesc);
167
168     /**
169      * Look up an pre-destroy LifecycleCallbackDescriptor with the
170      * given name. Return null if it is not found
171      * @param className
172      */

173     public LifecycleCallbackDescriptor getPreDestroy(String JavaDoc className);
174 }
175
Popular Tags