1. package org.omg.PortableServer;
  2. /**
  3. * org/omg/PortableServer/POAOperations.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
  6. * Wednesday, September 15, 2004 10:28:41 AM GMT
  7. */
  8. /**
  9. * A POA object manages the implementation of a
  10. * collection of objects. The POA supports a name space
  11. * for the objects, which are identified by Object Ids.
  12. * A POA also provides a name space for POAs. A POA is
  13. * created as a child of an existing POA, which forms a
  14. * hierarchy starting with the root POA. A POA object
  15. * must not be exported to other processes, or
  16. * externalized with ORB::object_to_string.
  17. */
  18. public interface POAOperations
  19. {
  20. /**
  21. * This operation creates a new POA as a child of the
  22. * target POA.
  23. * @param adapter_name identifies the new POA with
  24. * respect to other POAs with the same parent POA.
  25. * @param a_POAManager specifies the POA Manager to be
  26. * associated with the new POA.
  27. * @param policies specifies policy objects to be
  28. * associated with the POA to control its behavior.
  29. * @exception AdapterAlreadyExists specifies that the
  30. * target POA already has a child POA with
  31. * the specified name.
  32. * @exception InvalidPolicy is raised if any of the
  33. * policy objects are not valid for the ORB,
  34. * or are in conflict, or require an
  35. * administrative action that has not been
  36. * performed.
  37. */
  38. org.omg.PortableServer.POA create_POA (String adapter_name, org.omg.PortableServer.POAManager a_POAManager, org.omg.CORBA.Policy[] policies) throws org.omg.PortableServer.POAPackage.AdapterAlreadyExists, org.omg.PortableServer.POAPackage.InvalidPolicy;
  39. /**
  40. * If the target POA is the parent of a child POA with
  41. * the specified name (relative to the target POA), that
  42. * child POA is returned.
  43. * @param adapter_name POA name to be found.
  44. * @param activate_it if a POA with the specified
  45. * name does not exist and the value of
  46. * the activate_it parameter is TRUE, the target
  47. * POA's AdapterActivator, if one exists,
  48. * is invoked.
  49. * @return POA if one exists or is activated by the
  50. * AdapterActivator.
  51. * @return AdapterNonExistent is raised if POA with
  52. * a specified name cannot be found or
  53. * activated using AdapaterActivator.
  54. */
  55. org.omg.PortableServer.POA find_POA (String adapter_name, boolean activate_it) throws org.omg.PortableServer.POAPackage.AdapterNonExistent;
  56. /**
  57. * This operation destroys the POA and all descendant
  58. * POAs. All descendant POAs are destroyed (recursively)
  59. * before the destruction of the containing POA. The POA
  60. * so destroyed (that is, the POA with its name) may be
  61. * re-created later in the same process.
  62. * @param etherealize_objects flag to indicate whether
  63. * etherealize operation on servant manager needs
  64. * to be called.
  65. * @param wait_for_completion flag to indicate whether
  66. * POA and its children need to wait for active
  67. * requests and the etherealization to complete.
  68. *
  69. */
  70. void destroy (boolean etherealize_objects, boolean wait_for_completion);
  71. /**
  72. * These operations each return a reference to a policy
  73. * object with the specified value.
  74. * @param value policy type
  75. * @return ThreadPolcy Object
  76. */
  77. org.omg.PortableServer.ThreadPolicy create_thread_policy (org.omg.PortableServer.ThreadPolicyValue value);
  78. /**
  79. * These operations each return a reference to a policy
  80. * object with the specified value.
  81. * @param value policy type
  82. * @return LifespanPolicy Object.
  83. */
  84. org.omg.PortableServer.LifespanPolicy create_lifespan_policy (org.omg.PortableServer.LifespanPolicyValue value);
  85. /**
  86. * These operations each return a reference to a policy
  87. * object with the specified value.
  88. * @param value policy type
  89. * @return IdUniquenessPolicy Object.
  90. */
  91. org.omg.PortableServer.IdUniquenessPolicy create_id_uniqueness_policy (org.omg.PortableServer.IdUniquenessPolicyValue value);
  92. /**
  93. * These operations each return a reference to a policy
  94. * object with the specified value.
  95. * @param value policy type
  96. * @return IdAssignmentPolicy Object.
  97. */
  98. org.omg.PortableServer.IdAssignmentPolicy create_id_assignment_policy (org.omg.PortableServer.IdAssignmentPolicyValue value);
  99. /**
  100. * These operations each return a reference to a policy
  101. * object with the specified value.
  102. * @param value policy type
  103. * @return ImplicitActivationPolicy Object.
  104. */
  105. org.omg.PortableServer.ImplicitActivationPolicy create_implicit_activation_policy (org.omg.PortableServer.ImplicitActivationPolicyValue value);
  106. /**
  107. * These operations each return a reference to a policy
  108. * object with the specified value.
  109. * @param value policy type
  110. * @return ServantRetentionPolicy Object.
  111. */
  112. org.omg.PortableServer.ServantRetentionPolicy create_servant_retention_policy (org.omg.PortableServer.ServantRetentionPolicyValue value);
  113. /**
  114. * These operations each return a reference to a policy
  115. * object with the specified value.
  116. * @param value policy type
  117. * @return RequestProcessingPolicy Object.
  118. */
  119. org.omg.PortableServer.RequestProcessingPolicy create_request_processing_policy (org.omg.PortableServer.RequestProcessingPolicyValue value);
  120. /**
  121. * This attribute identifies the POA relative to its
  122. * parent. This name is assigned when the POA is created.
  123. */
  124. String the_name ();
  125. /**
  126. * This attribute identifies the parent of the POA.
  127. * The parent of the root POA is null.
  128. */
  129. org.omg.PortableServer.POA the_parent ();
  130. /**
  131. * This attribute identifies the current set of all
  132. * child POAs of the POA. The set of child POAs
  133. * includes only the POA's immediate children, and
  134. * not their descendants.
  135. */
  136. org.omg.PortableServer.POA[] the_children ();
  137. /**
  138. * This attribute identifies the POA manager
  139. * associated with the POA.
  140. */
  141. org.omg.PortableServer.POAManager the_POAManager ();
  142. /**
  143. * This attribute identifies the adapter activator
  144. * associated with the POA.
  145. */
  146. org.omg.PortableServer.AdapterActivator the_activator ();
  147. /**
  148. * This attribute identifies the adapter activator
  149. * associated with the POA.
  150. */
  151. void the_activator (org.omg.PortableServer.AdapterActivator newThe_activator);
  152. /**
  153. *
  154. * If the ServantRetentionPolicy of the POA is RETAIN,
  155. * then the ServantManager argument (imgr) shall support
  156. * the ServantActivator interface. For a NON_RETAIN policy,
  157. * the ServantManager shall support the ServantLocator
  158. * interface. If the argument is nil, or does not support
  159. * the required interface, then the OBJ_ADAPTER
  160. * exception is raised.
  161. * @return ServantManager associated with a POA or null if
  162. * none exists.
  163. * @exception WrongPolicy raised if the
  164. * USE_SERVANT_MANAGER policy is not specified.
  165. */
  166. org.omg.PortableServer.ServantManager get_servant_manager () throws org.omg.PortableServer.POAPackage.WrongPolicy;
  167. /**
  168. *
  169. * This operation sets the default servant manager
  170. * associated with the POA. This operation may only be
  171. * invoked once after a POA has been created. Attempting
  172. * to set the servant manager after one has already
  173. * been set will result in the BAD_INV_ORDER exception
  174. * being raised.
  175. * @param imgr servant manager to be used as a default.
  176. * @exception WrongPolicy raised if the
  177. * USE_SERVANT_MANAGER policy is not specified.
  178. */
  179. void set_servant_manager (org.omg.PortableServer.ServantManager imgr) throws org.omg.PortableServer.POAPackage.WrongPolicy;
  180. /**
  181. * This operation returns the default servant associated
  182. * with the POA.
  183. * @return p_servant default servant associated with a POA.
  184. * @exception NoServant raised if no default servant is
  185. * associated with the POA.
  186. * @exception WrongPolicy raised if the
  187. * USE_DEFAULT_SERVANT policy is not specified.
  188. */
  189. org.omg.PortableServer.Servant get_servant () throws org.omg.PortableServer.POAPackage.NoServant, org.omg.PortableServer.POAPackage.WrongPolicy;
  190. /**
  191. *
  192. * This operation registers the specified servant with
  193. * the POA as the default servant. This servant will
  194. * be used for all requests for which no servant is
  195. * found in the Active Object Map.
  196. * @param p_servant servant to be used as a default.
  197. * @exception WrongPolicy raised if the
  198. * USE_DEFAULT_SERVANT policy is not specified.
  199. */
  200. void set_servant (org.omg.PortableServer.Servant p_servant) throws org.omg.PortableServer.POAPackage.WrongPolicy;
  201. /**
  202. *
  203. * This operation generates an Object Id and enters
  204. * the Object Id and the specified servant in the
  205. * Active Object Map.
  206. * @param p_servant servant to be associated with an
  207. * object to be activated.
  208. * @return POA generated object id.
  209. * @exception ServantAlreadyActive is raised if the
  210. * POA has UNIQUE_ID policy and servant is
  211. * is already in the Active Object Map.
  212. * @exception WrongPolicy raised if the SYSTEM_ID and
  213. * RETAIN policies are not specified.
  214. */
  215. byte[] activate_object (org.omg.PortableServer.Servant p_servant) throws org.omg.PortableServer.POAPackage.ServantAlreadyActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  216. /**
  217. * This operation enters an association between the
  218. * specified Object Id and the specified servant in the
  219. * Active Object Map.
  220. * @param id object id for the object to be activated.
  221. * @param p_servant servant to be associated with the
  222. * object.
  223. * @exception ServantAlreadyActive raised if the POA
  224. * has the UNIQUE_ID policy and the servant
  225. * is already in the Active Object Map.
  226. * @exception ObjectAlreadyActive raised if the object is
  227. * already active in the POA.
  228. * @exception WrongPolicy raised if the RETAIN policy is
  229. * is not specified.
  230. */
  231. void activate_object_with_id (byte[] id, org.omg.PortableServer.Servant p_servant) throws org.omg.PortableServer.POAPackage.ServantAlreadyActive, org.omg.PortableServer.POAPackage.ObjectAlreadyActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  232. /**
  233. *
  234. * This operation causes the ObjectId specified in the
  235. * oid parameter to be deactivated. An ObjectId which
  236. * has been deactivated continues to process requests
  237. * until there are no active requests for that ObjectId.
  238. * A deactivated ObjectId is removed from the Active
  239. * Object Map when all requests executing for that
  240. * ObjectId have completed.
  241. * @param oid Object Id for the object to be deactivated.
  242. * @exception ObjectNotActive if the object with the
  243. * specified oid is not in the Active Object
  244. * Map.
  245. * @exception WrongPolicy raised if the RETAIN policy is
  246. * is not specified.
  247. */
  248. void deactivate_object (byte[] oid) throws org.omg.PortableServer.POAPackage.ObjectNotActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  249. /**
  250. * This operation creates an object reference that
  251. * encapsulates a POA-generated Object Id value and
  252. * the specified interface repository id.
  253. *
  254. * @param intf rep id for creating an object reference.
  255. * @return object reference created using intf.
  256. * @exception WrongPolicy if SYSTEM_ID policy is not
  257. * specified.
  258. */
  259. org.omg.CORBA.Object create_reference (String intf) throws org.omg.PortableServer.POAPackage.WrongPolicy;
  260. /**
  261. * This operation creates an object reference that
  262. * encapsulates the specified Object Id and interface
  263. * repository Id values. It does not cause an activation
  264. * to take place. The resulting reference may be passed
  265. * to clients, so that subsequent requests on those
  266. * references will cause the object to be activated
  267. * if necessary, or the default servant used, depending
  268. * on the applicable policies.
  269. * @param oid object id for creating an objref
  270. * @param intf rep id for creating an objref
  271. * @return object reference created using oid and intf
  272. * @exception BAD_PARAM is raised if the POA has the
  273. * SYSTEM_ID policy and it detects that the
  274. * Object Id value was not generated by the
  275. * system or for this POA.
  276. */
  277. org.omg.CORBA.Object create_reference_with_id (byte[] oid, String intf);
  278. /**
  279. * This operation has four possible behaviors.
  280. * 1. If the POA has the UNIQUE_ID policy and the
  281. * specified servant is active, the Object Id associated
  282. * with that servant is returned.
  283. * 2. If the POA has the IMPLICIT_ACTIVATION policy and
  284. * either the POA has the MULTIPLE_ID policy or the
  285. * specified servant is not active, the servant is
  286. * activated using a POA-generated Object Id and the
  287. * Interface Id associated with the servant, and that
  288. * Object Id is returned.
  289. * 3. If the POA has the USE_DEFAULT_SERVANT policy,
  290. * the servant specified is the default servant, and the
  291. * operation is being invoked in the context of executing
  292. * a request on the default servant, then the ObjectId
  293. * associated with the current invocation is returned.
  294. * 4. Otherwise, the ServantNotActive exception is raised.
  295. *
  296. * @param p_servant servant for which the object disi returned.
  297. * @return object id associated with the servant.
  298. * @exception ServantNotActive if the above rules and
  299. * policy combination is not met.
  300. * @exception WrongPolicy if the USE_DEFAULT_SERVANT policy
  301. * or a combination of the RETAIN policy and
  302. * either the UNIQUE_ID or IMPLICIT_ACTIVATION
  303. * policies are not present.
  304. */
  305. byte[] servant_to_id (org.omg.PortableServer.Servant p_servant) throws org.omg.PortableServer.POAPackage.ServantNotActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  306. /**
  307. * This operation requires the RETAIN policy and either
  308. * the UNIQUE_ID or IMPLICIT_ACTIVATION policies if
  309. * invoked outside the context of an operation dispatched
  310. * by this POA. It has four possible behaviors.
  311. * 1. If the POA has both the RETAIN and the
  312. * UNIQUE_ID policy and the specified servant is active,
  313. * an object reference encapsulating the information used
  314. * to activate the servant is returned.
  315. * 2. If the POA has both the RETAIN and the
  316. * IMPLICIT_ACTIVATION policy and either the POA has the
  317. * MULTIPLE_ID policy or the specified servant is not
  318. * active, the servant is activated using a POA-generated
  319. * Object Id and the Interface Id associated with the
  320. * servant, and a corresponding object reference is
  321. * returned.
  322. * 3. If the operation was invoked in the context of
  323. * executing a request on the specified servant, the
  324. * reference associated with the current invocation
  325. * is returned.
  326. * 4. Otherwise, the ServantNotActive exception is raised.
  327. *
  328. * @param p_servant servant for which the object reference
  329. * needs to be obtained.
  330. * @return object reference associated with the servant.
  331. * @exception WrongPolicy if the operation is not invoked
  332. * in the context of executing a request on
  333. * the specified servant and the required
  334. * policies are not present.
  335. * @exception ServantNotActive if the above specified
  336. * policies and rules are not met.
  337. */
  338. org.omg.CORBA.Object servant_to_reference (org.omg.PortableServer.Servant p_servant) throws org.omg.PortableServer.POAPackage.ServantNotActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  339. /**
  340. * If the POA has the RETAIN policy and the specified
  341. * object is present in the Active Object Map, this
  342. * operation returns the servant associated with that
  343. * object in the Active Object Map. Otherwise, if the
  344. * POA has the USE_DEFAULT_SERVANT policy and a default
  345. * servant has been registered with the POA, this
  346. * operation returns the default servant. If the object
  347. * reference was not created by this POA,
  348. * the WrongAdapter exception is raised. (OMG Issue
  349. * on inconsistency with the POA.IDL.
  350. *
  351. * @param reference object reference for which the
  352. * servant is returned.
  353. * @return servant associated with the reference.
  354. * @exception WrongPolicy if neither the RETAIN policy or
  355. * the USE_DEFAULT_SERVANT policy is present.
  356. * @exception ObjectNotActive if the servant is not
  357. * present in the Active Object Map (for RETAIN)
  358. * or no default servant is registered (for
  359. * USE_DEFAULT_POLICY).
  360. * @exception WrongAdapter if reference was not created by
  361. * this POA instance.
  362. */
  363. org.omg.PortableServer.Servant reference_to_servant (org.omg.CORBA.Object reference) throws org.omg.PortableServer.POAPackage.ObjectNotActive, org.omg.PortableServer.POAPackage.WrongPolicy, org.omg.PortableServer.POAPackage.WrongAdapter;
  364. /**
  365. * This operation returns the Object Id value
  366. * encapsulated by the specified reference. This
  367. * operation is valid only if the reference was created
  368. * by the POA on which the operation is being performed.
  369. * The object denoted by the reference does not have
  370. * to be active for this operation to succeed.
  371. *
  372. * @param reference the object reference from which the
  373. * object id needs to be returned.
  374. * @return object id encapsulated in the reference.
  375. * @exception WrongAdapter if the reference was not
  376. * created by the POA specified in the
  377. * reference.
  378. * @exception WrongPolicy declared to allow future
  379. * extensions.
  380. *
  381. */
  382. byte[] reference_to_id (org.omg.CORBA.Object reference) throws org.omg.PortableServer.POAPackage.WrongAdapter, org.omg.PortableServer.POAPackage.WrongPolicy;
  383. /**
  384. * If the POA has the RETAIN policy and the specified
  385. * ObjectId is in the Active Object Map, this operation
  386. * returns the servant associated with that object in
  387. * the Active Object Map. Otherwise, if the POA has
  388. * the USE_DEFAULT_SERVANT policy and a default servant
  389. * has been registered with the POA, this operation
  390. * returns the default servant.
  391. *
  392. * @param oid object id for the which the servant is
  393. * returned.
  394. * @return servant associated with oid.
  395. * @exception ObjectNotActive is raised if ObjectId is
  396. * is not in the Active Object Map (for RETAIN
  397. * policy), or no default servant is registered
  398. * (for USE_DEFAULT_SERVANT policy).
  399. *
  400. * @exception WrongPolicy is raised if the RETAIN policy
  401. * or the USE_DEFAULT_SERVANT
  402. * policy is not present.
  403. */
  404. org.omg.PortableServer.Servant id_to_servant (byte[] oid) throws org.omg.PortableServer.POAPackage.ObjectNotActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  405. /**
  406. * If an object with the specified Object Id value is
  407. * currently active, a reference encapsulating the
  408. * information used to activate the object is returned.
  409. *
  410. * @param oid id of the object for which the
  411. * reference is returned.
  412. * @return the object reference
  413. *
  414. * @exception ObjectNotActive if the Object Id value
  415. * is not active in the POA.
  416. * @exception WrongPolicy if the RETAIN policy is not
  417. * present.
  418. */
  419. org.omg.CORBA.Object id_to_reference (byte[] oid) throws org.omg.PortableServer.POAPackage.ObjectNotActive, org.omg.PortableServer.POAPackage.WrongPolicy;
  420. /**
  421. * This returns the unique id of the POA in the process in which it
  422. * is created. It is for use by portable interceptors.
  423. * <p>
  424. * This id is guaranteed unique for the life span of the POA in the
  425. * process. For persistent POAs, this means that if a POA is created
  426. * in the same path with the same name as another POA, these POAs
  427. * are identical and, therefore, have the same id. For transient
  428. * POAs, each POA is unique.
  429. */
  430. byte[] id ();
  431. } // interface POAOperations