1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/classes/javax/rmi/CORBA/UtilDelegate.java Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,135 @@ 1.4 +/* 1.5 + * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Sun designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Sun in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 1.26 + * have any questions. 1.27 + */ 1.28 +/* 1.29 + * Licensed Materials - Property of IBM 1.30 + * RMI-IIOP v1.0 1.31 + * Copyright IBM Corp. 1998 1999 All Rights Reserved 1.32 + * 1.33 + */ 1.34 + 1.35 +package javax.rmi.CORBA; 1.36 + 1.37 +import java.io.Serializable; 1.38 +import java.rmi.Remote; 1.39 +import java.rmi.RemoteException; 1.40 +import javax.rmi.CORBA.Tie; 1.41 +import javax.rmi.CORBA.ValueHandler; 1.42 +import org.omg.CORBA.ORB; 1.43 +import org.omg.CORBA.portable.InputStream; 1.44 +import org.omg.CORBA.portable.OutputStream; 1.45 +import org.omg.CORBA.SystemException; 1.46 + 1.47 +/** 1.48 + * Supports delegation for method implementations in {@link Util}. The 1.49 + * delegate is a singleton instance of a class that implements this 1.50 + * interface and provides a replacement implementation for all the 1.51 + * methods of <code>javax.rmi.CORBA.Util</code>. 1.52 + * 1.53 + * Delegation is enabled by providing the delegate's class name as the 1.54 + * value of the 1.55 + * <code>javax.rmi.CORBA.UtilClass</code> 1.56 + * system property. 1.57 + * 1.58 + * @see Util 1.59 + */ 1.60 +public interface UtilDelegate { 1.61 + 1.62 + /** 1.63 + * Delegation call for {@link Util#mapSystemException}. 1.64 + */ 1.65 + RemoteException mapSystemException(SystemException ex); 1.66 + 1.67 + /** 1.68 + * Delegation call for {@link Util#writeAny}. 1.69 + */ 1.70 + void writeAny(OutputStream out, Object obj); 1.71 + 1.72 + /** 1.73 + * Delegation call for {@link Util#readAny}. 1.74 + */ 1.75 + java.lang.Object readAny(InputStream in); 1.76 + 1.77 + /** 1.78 + * Delegation call for {@link Util#writeRemoteObject}. 1.79 + */ 1.80 + void writeRemoteObject(OutputStream out, Object obj); 1.81 + 1.82 + /** 1.83 + * Delegation call for {@link Util#writeAbstractObject}. 1.84 + */ 1.85 + void writeAbstractObject(OutputStream out, Object obj); 1.86 + 1.87 + /** 1.88 + * Delegation call for {@link Util#registerTarget}. 1.89 + */ 1.90 + void registerTarget(Tie tie, Remote target); 1.91 + 1.92 + /** 1.93 + * Delegation call for {@link Util#unexportObject}. 1.94 + */ 1.95 + void unexportObject(Remote target) throws java.rmi.NoSuchObjectException; 1.96 + 1.97 + /** 1.98 + * Delegation call for {@link Util#getTie}. 1.99 + */ 1.100 + Tie getTie(Remote target); 1.101 + 1.102 + /** 1.103 + * Delegation call for {@link Util#createValueHandler}. 1.104 + */ 1.105 + ValueHandler createValueHandler(); 1.106 + 1.107 + /** 1.108 + * Delegation call for {@link Util#getCodebase}. 1.109 + */ 1.110 + String getCodebase(Class clz); 1.111 + 1.112 + /** 1.113 + * Delegation call for {@link Util#loadClass}. 1.114 + */ 1.115 + Class loadClass(String className, String remoteCodebase, ClassLoader loader) 1.116 + throws ClassNotFoundException; 1.117 + 1.118 + /** 1.119 + * Delegation call for {@link Util#isLocal}. 1.120 + */ 1.121 + boolean isLocal(Stub stub) throws RemoteException; 1.122 + 1.123 + /** 1.124 + * Delegation call for {@link Util#wrapException}. 1.125 + */ 1.126 + RemoteException wrapException(Throwable obj); 1.127 + 1.128 + /** 1.129 + * Delegation call for {@link Util#copyObject}. 1.130 + */ 1.131 + Object copyObject(Object obj, ORB orb) throws RemoteException; 1.132 + 1.133 + /** 1.134 + * Delegation call for {@link Util#copyObjects}. 1.135 + */ 1.136 + Object[] copyObjects(Object[] obj, ORB orb) throws RemoteException; 1.137 + 1.138 +}