1. /*
  2. * @(#)POAHelper.java 1.3 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. package org.omg.PortableServer;
  8. /**
  9. * org/omg/PortableServer/POAHelper.java .
  10. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  11. * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
  12. * Tuesday, October 23, 2001 1:16:58 PM PDT
  13. */
  14. /**
  15. * A POA object manages the implementation of a
  16. * collection of objects. The POA supports a name space
  17. * for the objects, which are identified by Object Ids.
  18. * A POA also provides a name space for POAs. A POA is
  19. * created as a child of an existing POA, which forms a
  20. * hierarchy starting with the root POA. A POA object
  21. * must not be exported to other processes, or
  22. * externalized with ORB::object_to_string.
  23. */
  24. abstract public class POAHelper
  25. {
  26. private static String _id = "IDL:omg.org/PortableServer/POA:2.3";
  27. public static void insert (org.omg.CORBA.Any a,
  28. org.omg.PortableServer.POA that)
  29. {
  30. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  31. a.type (type ());
  32. write (out, that);
  33. a.read_value (out.create_input_stream (), type ());
  34. }
  35. public static org.omg.PortableServer.POA extract (org.omg.CORBA.Any a)
  36. {
  37. return read (a.create_input_stream ());
  38. }
  39. private static org.omg.CORBA.TypeCode __typeCode = null;
  40. synchronized public static org.omg.CORBA.TypeCode type ()
  41. {
  42. if (__typeCode == null)
  43. {
  44. __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.PortableServer.POAHelper.id (), "POA");
  45. }
  46. return __typeCode;
  47. }
  48. public static String id ()
  49. {
  50. return _id;
  51. }
  52. public static org.omg.PortableServer.POA read (
  53. org.omg.CORBA.portable.InputStream istream)
  54. {
  55. throw new org.omg.CORBA.MARSHAL ();
  56. }
  57. public static void write (org.omg.CORBA.portable.OutputStream ostream,
  58. org.omg.PortableServer.POA value)
  59. {
  60. throw new org.omg.CORBA.MARSHAL ();
  61. }
  62. public static org.omg.PortableServer.POA narrow (org.omg.CORBA.Object obj)
  63. {
  64. if (obj == null)
  65. return null;
  66. else if (obj instanceof org.omg.PortableServer.POA)
  67. return (org.omg.PortableServer.POA)obj;
  68. else if (!obj._is_a (id ()))
  69. throw new org.omg.CORBA.BAD_PARAM ();
  70. return null;
  71. }
  72. }