1. package org.omg.PortableInterceptor;
  2. /**
  3. * org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
  6. * Wednesday, September 15, 2004 10:28:46 AM GMT
  7. */
  8. /** The object reference template. An instance of this must
  9. * exist for each object adapter created in an ORB. The server_id,
  10. * orb_id, and adapter_name attributes uniquely identify this template
  11. * within the scope of an IMR. Note that adapter_id is similarly unique
  12. * within the same scope, but it is opaque, and less useful in many
  13. * cases.
  14. */
  15. abstract public class ObjectReferenceTemplateHelper
  16. {
  17. private static String _id = "IDL:omg.org/PortableInterceptor/ObjectReferenceTemplate:1.0";
  18. public static void insert (org.omg.CORBA.Any a, org.omg.PortableInterceptor.ObjectReferenceTemplate that)
  19. {
  20. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  21. a.type (type ());
  22. write (out, that);
  23. a.read_value (out.create_input_stream (), type ());
  24. }
  25. public static org.omg.PortableInterceptor.ObjectReferenceTemplate extract (org.omg.CORBA.Any a)
  26. {
  27. return read (a.create_input_stream ());
  28. }
  29. private static org.omg.CORBA.TypeCode __typeCode = null;
  30. private static boolean __active = false;
  31. synchronized public static org.omg.CORBA.TypeCode type ()
  32. {
  33. if (__typeCode == null)
  34. {
  35. synchronized (org.omg.CORBA.TypeCode.class)
  36. {
  37. if (__typeCode == null)
  38. {
  39. if (__active)
  40. {
  41. return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  42. }
  43. __active = true;
  44. org.omg.CORBA.ValueMember[] _members0 = new org.omg.CORBA.ValueMember[0];
  45. org.omg.CORBA.TypeCode _tcOf_members0 = null;
  46. __typeCode = org.omg.CORBA.ORB.init ().create_value_tc (_id, "ObjectReferenceTemplate", org.omg.CORBA.VM_ABSTRACT.value, null, _members0);
  47. __active = false;
  48. }
  49. }
  50. }
  51. return __typeCode;
  52. }
  53. public static String id ()
  54. {
  55. return _id;
  56. }
  57. public static org.omg.PortableInterceptor.ObjectReferenceTemplate read (org.omg.CORBA.portable.InputStream istream)
  58. {
  59. return (org.omg.PortableInterceptor.ObjectReferenceTemplate)((org.omg.CORBA_2_3.portable.InputStream) istream).read_value (id ());
  60. }
  61. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableInterceptor.ObjectReferenceTemplate value)
  62. {
  63. ((org.omg.CORBA_2_3.portable.OutputStream) ostream).write_value (value, id ());
  64. }
  65. }