KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)StubFactoryDynamicBase.java 1.3 04/04/20
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 java.lang.reflect.InvocationHandler JavaDoc ;
11 import java.lang.reflect.Proxy JavaDoc ;
12
13 import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
14 import com.sun.corba.se.spi.presentation.rmi.DynamicStub ;
15
16 import com.sun.corba.se.spi.orbutil.proxy.InvocationHandlerFactory ;
17 import com.sun.corba.se.spi.orbutil.proxy.LinkedInvocationHandler ;
18
19 public abstract class StubFactoryDynamicBase extends StubFactoryBase
20 {
21     protected final ClassLoader JavaDoc loader ;
22
23     public StubFactoryDynamicBase( PresentationManager.ClassData classData,
24     ClassLoader JavaDoc loader )
25     {
26     super( classData ) ;
27
28     // this.loader must not be null, or the newProxyInstance call
29
// will fail.
30
if (loader == null) {
31         ClassLoader JavaDoc cl = Thread.currentThread().getContextClassLoader();
32         if (cl == null)
33         cl = ClassLoader.getSystemClassLoader();
34         this.loader = cl ;
35     } else {
36         this.loader = loader ;
37     }
38     }
39
40     public abstract org.omg.CORBA.Object JavaDoc makeStub() ;
41 }
42
Popular Tags