1. package org.omg.IOP;
  2. /**
  3. * org/omg/IOP/TaggedProfileHelper.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/PortableInterceptor/IOP.idl
  6. * Monday, February 23, 2004 7:03:03 AM GMT
  7. */
  8. /**
  9. * Object references have at least one tagged profile. Each profile
  10. * supports one or more protocols and encapsulates all the basic
  11. * information the protocols it supports need to identify an object.
  12. * Any single profile holds enough information to drive a complete
  13. * invocation using any of the protocols it supports; the content
  14. * and structure of those profile entries are wholly specified by
  15. * these protocols.
  16. */
  17. abstract public class TaggedProfileHelper
  18. {
  19. private static String _id = "IDL:omg.org/IOP/TaggedProfile:1.0";
  20. public static void insert (org.omg.CORBA.Any a, org.omg.IOP.TaggedProfile that)
  21. {
  22. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  23. a.type (type ());
  24. write (out, that);
  25. a.read_value (out.create_input_stream (), type ());
  26. }
  27. public static org.omg.IOP.TaggedProfile extract (org.omg.CORBA.Any a)
  28. {
  29. return read (a.create_input_stream ());
  30. }
  31. private static org.omg.CORBA.TypeCode __typeCode = null;
  32. private static boolean __active = false;
  33. synchronized public static org.omg.CORBA.TypeCode type ()
  34. {
  35. if (__typeCode == null)
  36. {
  37. synchronized (org.omg.CORBA.TypeCode.class)
  38. {
  39. if (__typeCode == null)
  40. {
  41. if (__active)
  42. {
  43. return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  44. }
  45. __active = true;
  46. org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
  47. org.omg.CORBA.TypeCode _tcOf_members0 = null;
  48. _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong);
  49. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.IOP.ProfileIdHelper.id (), "ProfileId", _tcOf_members0);
  50. _members0[0] = new org.omg.CORBA.StructMember (
  51. "tag",
  52. _tcOf_members0,
  53. null);
  54. _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet);
  55. _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
  56. _members0[1] = new org.omg.CORBA.StructMember (
  57. "profile_data",
  58. _tcOf_members0,
  59. null);
  60. __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.IOP.TaggedProfileHelper.id (), "TaggedProfile", _members0);
  61. __active = false;
  62. }
  63. }
  64. }
  65. return __typeCode;
  66. }
  67. public static String id ()
  68. {
  69. return _id;
  70. }
  71. public static org.omg.IOP.TaggedProfile read (org.omg.CORBA.portable.InputStream istream)
  72. {
  73. org.omg.IOP.TaggedProfile value = new org.omg.IOP.TaggedProfile ();
  74. value.tag = istream.read_ulong ();
  75. int _len0 = istream.read_long ();
  76. value.profile_data = new byte[_len0];
  77. istream.read_octet_array (value.profile_data, 0, _len0);
  78. return value;
  79. }
  80. public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.IOP.TaggedProfile value)
  81. {
  82. ostream.write_ulong (value.tag);
  83. ostream.write_long (value.profile_data.length);
  84. ostream.write_octet_array (value.profile_data, 0, value.profile_data.length);
  85. }
  86. }