1. /*
  2. * @(#)IORAddressingInfoHelper.java 1.8 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.impl.protocol.giopmsgheaders;
  8. /**
  9. * com/sun/corba/se/impl/protocol/giopmsgheaders/IORAddressingInfoHelper.java
  10. * Generated by the IDL-to-Java compiler (portable), version "3.0"
  11. * from ../../../../../../../src/share/classes/com/sun/corba/se/GiopIDL/g.idl
  12. * Sunday, June 4, 2000 5:18:54 PM PDT
  13. */
  14. abstract public class IORAddressingInfoHelper
  15. {
  16. private static String _id = "IDL:messages/IORAddressingInfo:1.0";
  17. public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfo that)
  18. {
  19. org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
  20. a.type (type ());
  21. write (out, that);
  22. a.read_value (out.create_input_stream (), type ());
  23. }
  24. public static com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfo extract (org.omg.CORBA.Any a)
  25. {
  26. return read (a.create_input_stream ());
  27. }
  28. private static org.omg.CORBA.TypeCode __typeCode = null;
  29. private static boolean __active = false;
  30. synchronized public static org.omg.CORBA.TypeCode type ()
  31. {
  32. if (__typeCode == null)
  33. {
  34. synchronized (org.omg.CORBA.TypeCode.class)
  35. {
  36. if (__typeCode == null)
  37. {
  38. if (__active)
  39. {
  40. return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
  41. }
  42. __active = true;
  43. org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2];
  44. org.omg.CORBA.TypeCode _tcOf_members0 = null;
  45. _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong);
  46. _members0[0] = new org.omg.CORBA.StructMember (
  47. "selected_profile_index",
  48. _tcOf_members0,
  49. null);
  50. _tcOf_members0 = org.omg.IOP.IORHelper.type ();
  51. _members0[1] = new org.omg.CORBA.StructMember (
  52. "ior",
  53. _tcOf_members0,
  54. null);
  55. __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfoHelper.id (), "IORAddressingInfo", _members0);
  56. __active = false;
  57. }
  58. }
  59. }
  60. return __typeCode;
  61. }
  62. public static String id ()
  63. {
  64. return _id;
  65. }
  66. public static com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfo read (org.omg.CORBA.portable.InputStream istream)
  67. {
  68. com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfo value = new com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfo ();
  69. value.selected_profile_index = istream.read_ulong ();
  70. value.ior = org.omg.IOP.IORHelper.read (istream);
  71. return value;
  72. }
  73. public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.impl.protocol.giopmsgheaders.IORAddressingInfo value)
  74. {
  75. ostream.write_ulong (value.selected_profile_index);
  76. org.omg.IOP.IORHelper.write (ostream, value.ior);
  77. }
  78. }