KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > jbi > component > context > ComponentInitialContext


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: ComponentInitialContext.java 154 14 sept. 06 ofabre $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.jbi.component.context;
23
24 import java.util.Hashtable JavaDoc;
25
26 import javax.naming.Binding JavaDoc;
27 import javax.naming.Context JavaDoc;
28 import javax.naming.InitialContext JavaDoc;
29 import javax.naming.Name JavaDoc;
30 import javax.naming.NameClassPair JavaDoc;
31 import javax.naming.NameParser JavaDoc;
32 import javax.naming.NamingEnumeration JavaDoc;
33 import javax.naming.NamingException JavaDoc;
34
35 /**
36  * This class inherits from an InitialContext and delegates method calls to a
37  * JNDI subcontext.
38  *
39  * @author ofabre - EBM Websourcing
40  *
41  */

42 public class ComponentInitialContext extends InitialContext JavaDoc {
43
44     public ComponentInitialContext(Context JavaDoc usersContext) throws NamingException JavaDoc {
45         super();
46         this.usersContext = usersContext;
47     }
48
49     protected Context JavaDoc usersContext;
50
51     public Object JavaDoc addToEnvironment(String JavaDoc propName, Object JavaDoc propVal)
52         throws NamingException JavaDoc {
53         return usersContext.addToEnvironment(propName, propVal);
54     }
55
56     public void bind(Name JavaDoc name, Object JavaDoc obj) throws NamingException JavaDoc {
57         usersContext.bind(name, obj);
58     }
59
60     public void bind(String JavaDoc name, Object JavaDoc obj) throws NamingException JavaDoc {
61         usersContext.bind(name, obj);
62     }
63
64     public void close() throws NamingException JavaDoc {
65         usersContext.close();
66     }
67
68     public Name JavaDoc composeName(Name JavaDoc name, Name JavaDoc prefix) throws NamingException JavaDoc {
69         return usersContext.composeName(name, prefix);
70     }
71
72     public String JavaDoc composeName(String JavaDoc name, String JavaDoc prefix)
73         throws NamingException JavaDoc {
74         return usersContext.composeName(name, prefix);
75     }
76
77     public Context JavaDoc createSubcontext(Name JavaDoc name) throws NamingException JavaDoc {
78         return usersContext.createSubcontext(name);
79     }
80
81     public Context JavaDoc createSubcontext(String JavaDoc name) throws NamingException JavaDoc {
82         return usersContext.createSubcontext(name);
83     }
84
85     public void destroySubcontext(Name JavaDoc name) throws NamingException JavaDoc {
86         usersContext.destroySubcontext(name);
87     }
88
89     public void destroySubcontext(String JavaDoc name) throws NamingException JavaDoc {
90         usersContext.destroySubcontext(name);
91     }
92
93     public Hashtable JavaDoc<?, ?> getEnvironment() throws NamingException JavaDoc {
94         return usersContext.getEnvironment();
95     }
96
97     public String JavaDoc getNameInNamespace() throws NamingException JavaDoc {
98         return usersContext.getNameInNamespace();
99     }
100
101     public NameParser JavaDoc getNameParser(Name JavaDoc name) throws NamingException JavaDoc {
102         return usersContext.getNameParser(name);
103     }
104
105     public NameParser JavaDoc getNameParser(String JavaDoc name) throws NamingException JavaDoc {
106         return usersContext.getNameParser(name);
107     }
108
109     public NamingEnumeration JavaDoc<NameClassPair JavaDoc> list(Name JavaDoc name)
110         throws NamingException JavaDoc {
111         return usersContext.list(name);
112     }
113
114     public NamingEnumeration JavaDoc<NameClassPair JavaDoc> list(String JavaDoc name)
115         throws NamingException JavaDoc {
116         return usersContext.list(name);
117     }
118
119     public NamingEnumeration JavaDoc<Binding JavaDoc> listBindings(Name JavaDoc name)
120         throws NamingException JavaDoc {
121         return usersContext.listBindings(name);
122     }
123
124     public NamingEnumeration JavaDoc<Binding JavaDoc> listBindings(String JavaDoc name)
125         throws NamingException JavaDoc {
126         return usersContext.listBindings(name);
127     }
128
129     public Object JavaDoc lookup(Name JavaDoc name) throws NamingException JavaDoc {
130         return usersContext.lookup(name);
131     }
132
133     public Object JavaDoc lookup(String JavaDoc name) throws NamingException JavaDoc {
134         return usersContext.lookup(name);
135     }
136
137     public Object JavaDoc lookupLink(Name JavaDoc name) throws NamingException JavaDoc {
138         return usersContext.lookupLink(name);
139     }
140
141     public Object JavaDoc lookupLink(String JavaDoc name) throws NamingException JavaDoc {
142         return usersContext.lookupLink(name);
143     }
144
145     public void rebind(Name JavaDoc name, Object JavaDoc obj) throws NamingException JavaDoc {
146         usersContext.rebind(name, obj);
147     }
148
149     public void rebind(String JavaDoc name, Object JavaDoc obj) throws NamingException JavaDoc {
150         usersContext.rebind(name, obj);
151     }
152
153     public Object JavaDoc removeFromEnvironment(String JavaDoc propName) throws NamingException JavaDoc {
154         return usersContext.removeFromEnvironment(propName);
155     }
156
157     public void rename(Name JavaDoc oldName, Name JavaDoc newName) throws NamingException JavaDoc {
158         usersContext.rename(oldName, newName);
159     }
160
161     public void rename(String JavaDoc oldName, String JavaDoc newName) throws NamingException JavaDoc {
162         usersContext.rename(oldName, newName);
163     }
164
165     public void unbind(Name JavaDoc name) throws NamingException JavaDoc {
166         usersContext.unbind(name);
167     }
168
169     public void unbind(String JavaDoc name) throws NamingException JavaDoc {
170         usersContext.unbind(name);
171     }
172
173 }
174
Popular Tags