1. /*
  2. * @(#)Delegate.java 1.10 03/01/27
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package org.omg.PortableServer.portable;
  8. import org.omg.PortableServer.Servant;
  9. import org.omg.PortableServer.POA;
  10. /**
  11. * The portability package contains interfaces and classes
  12. * that are designed for and intended to be used by ORB
  13. * implementor. It exposes the publicly defined APIs that
  14. * are used to connect stubs and skeletons to the ORB.
  15. * The Delegate interface provides the ORB vendor specific
  16. * implementation of PortableServer::Servant.
  17. * Conformant to spec CORBA V2.3.1, ptc/00-01-08.pdf
  18. */
  19. public interface Delegate {
  20. /**
  21. * Convenience method that returns the instance of the ORB
  22. * currently associated with the Servant.
  23. * @param Self the servant.
  24. * @return ORB associated with the Servant.
  25. */
  26. org.omg.CORBA.ORB orb(Servant Self);
  27. /**
  28. * This allows the servant to obtain the object reference for
  29. * the target CORBA Object it is incarnating for that request.
  30. * @param Self the servant.
  31. * @return Object reference associated with the request.
  32. */
  33. org.omg.CORBA.Object this_object(Servant Self);
  34. /**
  35. * The method _poa() is equivalent to
  36. * calling PortableServer::Current:get_POA.
  37. * @param Self the servant.
  38. * @return POA associated with the servant.
  39. */
  40. POA poa(Servant Self);
  41. /**
  42. * The method _object_id() is equivalent
  43. * to calling PortableServer::Current::get_object_id.
  44. * @param Self the servant.
  45. * @return ObjectId associated with this servant.
  46. */
  47. byte[] object_id(Servant Self);
  48. /**
  49. * The default behavior of this function is to return the
  50. * root POA from the ORB instance associated with the servant.
  51. * @param Self the servant.
  52. * @return POA associated with the servant class.
  53. */
  54. POA default_POA(Servant Self);
  55. /**
  56. * This method checks to see if the specified repid is present
  57. * on the list returned by _all_interfaces() or is the
  58. * repository id for the generic CORBA Object.
  59. * @param Self the servant.
  60. * @param Repository_Id the repository_id to be checked in the
  61. * repository list or against the id of generic CORBA
  62. * object.
  63. * @return boolean indicating whether the specified repid is
  64. * in the list or is same as that got generic CORBA
  65. * object.
  66. */
  67. boolean is_a(Servant Self, String Repository_Id);
  68. /**
  69. * This operation is used to check for the existence of the
  70. * Object.
  71. * @param Self the servant.
  72. * @return boolean true to indicate that object does not exist,
  73. * and false otherwise.
  74. */
  75. boolean non_existent(Servant Self);
  76. //Simon And Ken Will Ask About Editorial Changes
  77. //In Idl To Java For The Following Signature.
  78. /**
  79. * This operation returns an object in the Interface Repository
  80. * which provides type information that may be useful to a program.
  81. * @param self the servant.
  82. * @return type information corresponding to the object.
  83. */
  84. // The get_interface() method has been replaced by get_interface_def()
  85. //org.omg.CORBA.Object get_interface(Servant Self);
  86. org.omg.CORBA.Object get_interface_def(Servant self);
  87. }