2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax.rmi.CORBA;
41 import java.rmi.Remote;
42 import java.rmi.RemoteException;
43 import java.lang.Object;
45 //import org.omg.CORBA.*;
46 //import org.omg.CORBA.portable.InputStream;
47 //import org.omg.CORBA.portable.OutputStream;
48 import gnu.javax.rmi.CORBA.DelegateFactory;
49 import gnu.javax.rmi.CORBA.GetDelegateInstanceException;
54 private static UtilDelegate delegate;
59 delegate = (UtilDelegate)DelegateFactory.getInstance("Util");
61 catch(GetDelegateInstanceException e)
71 // XXX - javax.rmi.ORB -> org.omg.CORBA.ORB
72 public static Object copyObject(Object obj, javax.rmi.ORB orb)
73 throws RemoteException
76 return delegate.copyObject(obj, orb);
81 // XXX - javax.rmi.ORB -> org.omg.CORBA.ORB
82 public static Object[] copyObjects(Object obj[], javax.rmi.ORB orb)
83 throws RemoteException
86 return delegate.copyObjects(obj, orb);
91 public static ValueHandler createValueHandler()
94 return delegate.createValueHandler();
99 public static String getCodebase(Class clz)
102 return delegate.getCodebase(clz);
107 public static Tie getTie(Remote target)
110 return delegate.getTie(target);
115 public static boolean isLocal(Stub stub)
116 throws RemoteException
119 return delegate.isLocal(stub);
124 public static Class loadClass(String className, String remoteCodebase, ClassLoader loader)
125 throws ClassNotFoundException
128 return delegate.loadClass(className, remoteCodebase, loader);
130 throw new ClassNotFoundException(className + ": delegate == null");
133 public static RemoteException mapSystemException(SystemException ex)
136 return delegate.mapSystemException(ex);
141 public static Object readAny(InputStream in)
144 return delegate.readAny(in);
149 public static void registerTarget(Tie tie, Remote target)
152 delegate.registerTarget(tie, target);
155 public static void unexportObject(Remote target)
158 delegate.unexportObject(target);
161 public static RemoteException wrapException(Throwable orig)
164 return delegate.wrapException(orig);
169 public static void writeAbstractObject(OutputStream out, Object obj)
172 delegate.writeAbstractObject(out, obj);
175 public static void writeAny(OutputStream out, Object obj)
178 delegate.writeAny(out, obj);
181 public static void writeRemoteObject(OutputStream out, Object obj)
184 delegate.writeRemoteObject(out, obj);