1 package com.javaranch.unittest.helper.sql.pool;
2
3
4 import java.util.Hashtable;
5
6 import javax.naming.Context;
7 import javax.naming.Name;
8 import javax.naming.NameParser;
9 import javax.naming.NamingEnumeration;
10 import javax.naming.NamingException;
11
12
13
14
15
16
17
18
19 public class SimpleContext implements Context
20 {
21
22 private Hashtable table = new Hashtable();
23
24
25
26
27
28
29
30
31
32
33
34
35 public Object lookup( Name name )
36 throws NamingException
37 {
38
39
40 throw new java.lang.UnsupportedOperationException(
41 "Method lookup() not yet implemented." );
42 }
43
44
45
46
47
48
49
50
51
52
53
54
55 public Object lookup( String name )
56 throws NamingException
57 {
58 return table.get( name );
59 }
60
61
62
63
64
65
66
67
68
69
70
71 public void bind( Name name, Object obj )
72 throws NamingException
73 {
74
75
76 throw new java.lang.UnsupportedOperationException(
77 "Method bind() not yet implemented." );
78 }
79
80
81
82
83
84
85
86
87
88
89
90 public void bind( String name, Object obj )
91 throws NamingException
92 {
93
94
95 table.put( name, obj );
96 }
97
98
99
100
101
102
103
104
105
106
107
108 public void rebind( Name name, Object obj )
109 throws NamingException
110 {
111
112
113 throw new java.lang.UnsupportedOperationException(
114 "Method rebind() not yet implemented." );
115 }
116
117
118
119
120
121
122
123
124
125
126
127 public void rebind( String name, Object obj )
128 throws NamingException
129 {
130
131
132 throw new java.lang.UnsupportedOperationException(
133 "Method rebind() not yet implemented." );
134 }
135
136
137
138
139
140
141
142
143
144
145 public void unbind( Name name )
146 throws NamingException
147 {
148
149
150 throw new java.lang.UnsupportedOperationException(
151 "Method unbind() not yet implemented." );
152 }
153
154
155
156
157
158
159
160
161
162
163 public void unbind( String name )
164 throws NamingException
165 {
166 table.remove( name );
167 }
168
169
170
171
172
173
174
175
176
177
178
179 public void rename( Name oldName, Name newName )
180 throws NamingException
181 {
182
183
184 throw new java.lang.UnsupportedOperationException(
185 "Method rename() not yet implemented." );
186 }
187
188
189
190
191
192
193
194
195
196
197
198 public void rename( String oldName, String newName )
199 throws NamingException
200 {
201
202
203 throw new java.lang.UnsupportedOperationException(
204 "Method rename() not yet implemented." );
205 }
206
207
208
209
210
211
212
213
214
215
216
217
218 public NamingEnumeration list( Name name )
219 throws NamingException
220 {
221
222
223 throw new java.lang.UnsupportedOperationException(
224 "Method list() not yet implemented." );
225 }
226
227
228
229
230
231
232
233
234
235
236
237
238 public NamingEnumeration list( String name )
239 throws NamingException
240 {
241
242
243 throw new java.lang.UnsupportedOperationException(
244 "Method list() not yet implemented." );
245 }
246
247
248
249
250
251
252
253
254
255
256
257
258 public NamingEnumeration listBindings( Name name )
259 throws NamingException
260 {
261
262
263 throw new java.lang.UnsupportedOperationException(
264 "Method listBindings() not yet implemented." );
265 }
266
267
268
269
270
271
272
273
274
275
276
277
278 public NamingEnumeration listBindings( String name )
279 throws NamingException
280 {
281
282
283 throw new java.lang.UnsupportedOperationException(
284 "Method listBindings() not yet implemented." );
285 }
286
287
288
289
290
291
292
293
294
295
296 public void destroySubcontext( Name name )
297 throws NamingException
298 {
299
300
301 throw new java.lang.UnsupportedOperationException(
302 "Method destroySubcontext() not yet implemented." );
303 }
304
305
306
307
308
309
310
311
312
313
314 public void destroySubcontext( String name )
315 throws NamingException
316 {
317
318
319 throw new java.lang.UnsupportedOperationException(
320 "Method destroySubcontext() not yet implemented." );
321 }
322
323
324
325
326
327
328
329
330
331
332
333
334 public Context createSubcontext( Name name )
335 throws NamingException
336 {
337
338
339 throw new java.lang.UnsupportedOperationException(
340 "Method createSubcontext() not yet implemented." );
341 }
342
343
344
345
346
347
348
349
350
351
352
353
354 public Context createSubcontext( String name )
355 throws NamingException
356 {
357
358
359 throw new java.lang.UnsupportedOperationException(
360 "Method createSubcontext() not yet implemented." );
361 }
362
363
364
365
366
367
368
369
370
371
372
373
374 public Object lookupLink( Name name )
375 throws NamingException
376 {
377
378
379 throw new java.lang.UnsupportedOperationException(
380 "Method lookupLink() not yet implemented." );
381 }
382
383
384
385
386
387
388
389
390
391
392
393
394 public Object lookupLink( String name )
395 throws NamingException
396 {
397
398
399 throw new java.lang.UnsupportedOperationException(
400 "Method lookupLink() not yet implemented." );
401 }
402
403
404
405
406
407
408
409
410
411
412
413
414 public NameParser getNameParser( Name name )
415 throws NamingException
416 {
417
418
419 throw new java.lang.UnsupportedOperationException(
420 "Method getNameParser() not yet implemented." );
421 }
422
423
424
425
426
427
428
429
430
431
432
433
434 public NameParser getNameParser( String name )
435 throws NamingException
436 {
437
438
439 throw new java.lang.UnsupportedOperationException(
440 "Method getNameParser() not yet implemented." );
441 }
442
443
444
445
446
447
448
449
450
451
452
453
454
455 public Name composeName( Name name, Name prefix )
456 throws NamingException
457 {
458
459
460 throw new java.lang.UnsupportedOperationException(
461 "Method composeName() not yet implemented." );
462 }
463
464
465
466
467
468
469
470
471
472
473
474
475
476 public String composeName( String name, String prefix )
477 throws NamingException
478 {
479
480
481 throw new java.lang.UnsupportedOperationException(
482 "Method composeName() not yet implemented." );
483 }
484
485
486
487
488
489
490
491
492
493
494
495
496
497 public Object addToEnvironment( String propName, Object propVal )
498 throws NamingException
499 {
500
501
502 throw new java.lang.UnsupportedOperationException(
503 "Method addToEnvironment() not yet implemented." );
504 }
505
506
507
508
509
510
511
512
513
514
515
516
517 public Object removeFromEnvironment( String propName )
518 throws NamingException
519 {
520
521
522 throw new java.lang.UnsupportedOperationException(
523 "Method removeFromEnvironment() not yet implemented." );
524 }
525
526
527
528
529
530
531
532
533
534
535 public Hashtable getEnvironment()
536 throws NamingException
537 {
538
539
540 throw new java.lang.UnsupportedOperationException(
541 "Method getEnvironment() not yet implemented." );
542 }
543
544
545
546
547
548
549
550
551 public void close()
552 throws NamingException
553 {
554
555
556 throw new java.lang.UnsupportedOperationException(
557 "Method close() not yet implemented." );
558 }
559
560
561
562
563
564
565
566
567
568
569 public String getNameInNamespace()
570 throws NamingException
571 {
572
573
574 throw new java.lang.UnsupportedOperationException(
575 "Method getNameInNamespace() not yet implemented." );
576 }
577 }