1. /*
  2. * @(#)PortableRemoteObjectDelegate.java 1.11 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. /*
  8. * Licensed Materials - Property of IBM
  9. * RMI-IIOP v1.0
  10. * Copyright IBM Corp. 1998 1999 All Rights Reserved
  11. *
  12. * US Government Users Restricted Rights - Use, duplication or
  13. * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  14. */
  15. package javax.rmi.CORBA;
  16. import java.rmi.RemoteException;
  17. import java.rmi.NoSuchObjectException;
  18. import java.rmi.Remote;
  19. /**
  20. * Supports delegation for method implementations in {@link javax.rmi.PortableRemoteObject}.
  21. * The delegate is a singleton instance of a class that implements this
  22. * interface and provides a replacement implementation for all the
  23. * methods of <code>javax.rmi.PortableRemoteObject</code>.
  24. *
  25. * Delegates are enabled by providing the delegate's class name as the
  26. * value of the
  27. * <code>javax.rmi.CORBA.PortableRemoteObjectClass</code>
  28. * system property.
  29. *
  30. * @see javax.rmi.PortableRemoteObject
  31. */
  32. public interface PortableRemoteObjectDelegate {
  33. /**
  34. * Delegation call for {@link javax.rmi.PortableRemoteObject#exportObject}.
  35. */
  36. void exportObject(Remote obj)
  37. throws RemoteException;
  38. /**
  39. * Delegation call for {@link javax.rmi.PortableRemoteObject#toStub}.
  40. */
  41. Remote toStub (Remote obj)
  42. throws NoSuchObjectException;
  43. /**
  44. * Delegation call for {@link javax.rmi.PortableRemoteObject#unexportObject}.
  45. */
  46. void unexportObject(Remote obj)
  47. throws NoSuchObjectException;
  48. /**
  49. * Delegation call for {@link javax.rmi.PortableRemoteObject#narrow}.
  50. */
  51. java.lang.Object narrow (java.lang.Object narrowFrom,
  52. java.lang.Class narrowTo)
  53. throws ClassCastException;
  54. /**
  55. * Delegation call for {@link javax.rmi.PortableRemoteObject#connect}.
  56. */
  57. void connect (Remote target, Remote source)
  58. throws RemoteException;
  59. }