Object.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. /* Object.java --
  2. Copyright (C) 2005 Free Software Foundation, Inc.
  3. This file is part of GNU Classpath.
  4. GNU Classpath is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. GNU Classpath is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Classpath; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. 02110-1301 USA.
  16. Linking this library statically or dynamically with other modules is
  17. making a combined work based on this library. Thus, the terms and
  18. conditions of the GNU General Public License cover the whole
  19. combination.
  20. As a special exception, the copyright holders of this library give you
  21. permission to link this library with independent modules to produce an
  22. executable, regardless of the license terms of these independent
  23. modules, and to copy and distribute the resulting executable under
  24. terms of your choice, provided that you also meet, for each linked
  25. independent module, the terms and conditions of the license of that
  26. module. An independent module is a module which is not derived from
  27. or based on this library. If you modify this library, you may extend
  28. this exception to your version of the library, but you are not
  29. obligated to do so. If you do not wish to do so, delete this
  30. exception statement from your version. */
  31. package org.omg.CORBA;
  32. /**
  33. * The CORBA object reference. The object can be either local or remote.
  34. * For the local object, the methods of the derived object are called
  35. * like on any other java object. For the remote object, the reference
  36. * points to the stup (proxy), responsible for the remote invocation.
  37. *
  38. * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
  39. */
  40. public interface Object
  41. {
  42. /**
  43. * Create a request to invoke the method of this object.
  44. *
  45. * @param context a list of additional properties.
  46. * @param operation the name of method to be invoked.
  47. * @param parameters the method parameters.
  48. * @param returns the container for tge method returned value.
  49. *
  50. * @return the created reaquest.
  51. */
  52. Request _create_request(Context context, String operation, NVList parameters,
  53. NamedValue returns
  54. );
  55. /**
  56. * Create a request to invoke the method of this object, specifying
  57. * context list and the list of the expected exception.
  58. *
  59. * @param context a list of additional properties.
  60. * @param operation the name of method to be invoked.
  61. * @param parameters the method parameters.
  62. * @param returns the container for tge method returned value.
  63. * @param exceptions the list of the possible exceptions that the method
  64. * can throw.
  65. * @param ctx_list the list of the context strings that need to be
  66. * resolved and send as a context instance.
  67. *
  68. * @return the created reaquest.
  69. */
  70. Request _create_request(Context context, String operation, NVList parameters,
  71. NamedValue returns, ExceptionList exceptions,
  72. ContextList ctx_list
  73. );
  74. /**
  75. * Duplicate the object reference. This does not make much sense for
  76. * java platform and is just included for the sake of compliance with
  77. * CORBA APIs.
  78. *
  79. * The method may return the object reference itself.
  80. *
  81. * @return as a rule, <code>this</code>.
  82. */
  83. org.omg.CORBA.Object _duplicate();
  84. /**
  85. * Retrieve the domain managers for this object.
  86. *
  87. * @return the domain managers.
  88. */
  89. DomainManager[] _get_domain_managers();
  90. /**
  91. * Get the <code>InterfaceDef</code> for this Object.
  92. */
  93. org.omg.CORBA.Object _get_interface_def();
  94. /**
  95. * Returns the {@link Policy}, applying to this object.
  96. *
  97. * @param a_policy_type a type of policy to be obtained.
  98. * @return a corresponding Policy object.
  99. *
  100. * @throws BAD_PARAM if the policy of the given type is not
  101. * associated with this object, or if it is not supported by this ORB.
  102. */
  103. Policy _get_policy(int a_policy_type)
  104. throws BAD_PARAM;
  105. /**
  106. * Get the hashcode this object reference. The same hashcode still
  107. * does not means that the references are the same. From the other
  108. * side, two different references may still refer to the same CORBA
  109. * object. The returned value must not change during the object
  110. * lifetime.
  111. *
  112. * @param maximum the maximal value to return.
  113. *
  114. * @return the hashcode.
  115. */
  116. int _hash(int maximum);
  117. /**
  118. * Check if this object can be referenced by the given repository id.
  119. *
  120. * @param repositoryIdentifer the repository id.
  121. *
  122. * @return true if the passed parameter is a repository id of this
  123. * CORBA object.
  124. */
  125. boolean _is_a(String repositoryIdentifer);
  126. /**
  127. * Return true if the other object references are equivalent, so far as
  128. * it is possible to determine this easily.
  129. *
  130. * @param other the other object reference.
  131. *
  132. * @return true if both references refer the same object, false
  133. * if they probably can refer different objects.
  134. */
  135. boolean _is_equivalent(org.omg.CORBA.Object other);
  136. /**
  137. * Determines if the server object for this reference has already
  138. * been destroyed.
  139. *
  140. * @return true if the object has been destroyed, false otherwise.
  141. */
  142. boolean _non_existent();
  143. /**
  144. * Free resoureces, occupied by this reference. The object implementation
  145. * is not notified, and the other references to the same object are not
  146. * affected.
  147. */
  148. void _release();
  149. /**
  150. * Create a request to invoke the method of this CORBA object.
  151. *
  152. * @param operation the name of the method to invoke.
  153. *
  154. * @return the request.
  155. */
  156. Request _request(String operation);
  157. /**
  158. * Returns a new object with the new policies either replacing or
  159. * extending the current policies, depending on the second parameter.
  160. *
  161. * @param policies the policy additions or replacements.
  162. *
  163. * @param how either {@link SetOverrideType#SET_OVERRIDE} to override the
  164. * current policies of {@link SetOverrideType#ADD_OVERRIDE} to replace
  165. * them.
  166. *
  167. * @return the new reference with the changed policies.
  168. */
  169. Object _set_policy_override(Policy[] policies, SetOverrideType how);
  170. }