KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > presentation > rmi > StubFactoryBase


1 /*
2  * @(#)StubFactoryBase.java 1.7 04/07/27
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.presentation.rmi ;
9
10 import javax.rmi.CORBA.Tie JavaDoc ;
11
12 import java.lang.reflect.InvocationHandler JavaDoc ;
13 import java.lang.reflect.Proxy JavaDoc ;
14
15 import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
16 import com.sun.corba.se.spi.presentation.rmi.DynamicStub ;
17 import com.sun.corba.se.spi.presentation.rmi.StubAdapter ;
18
19 import com.sun.corba.se.spi.orbutil.proxy.InvocationHandlerFactory ;
20 import com.sun.corba.se.spi.orbutil.proxy.LinkedInvocationHandler ;
21
22 public abstract class StubFactoryBase implements PresentationManager.StubFactory
23 {
24     private String JavaDoc[] typeIds = null ;
25
26     protected final PresentationManager.ClassData classData ;
27
28     protected StubFactoryBase( PresentationManager.ClassData classData )
29     {
30     this.classData = classData ;
31     }
32
33     public synchronized String JavaDoc[] getTypeIds()
34     {
35     if (typeIds == null) {
36         if (classData == null) {
37         org.omg.CORBA.Object JavaDoc stub = makeStub() ;
38         typeIds = StubAdapter.getTypeIds( stub ) ;
39         } else {
40         typeIds = classData.getTypeIds() ;
41         }
42     }
43
44     return typeIds ;
45     }
46 }
47
Popular Tags