1. /*
  2. * @(#)ORBTypeComponent.java 1.17 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. //Source file: J:/ws/serveractivation/src/share/classes/com.sun.corba.se.internal.ior/ORBTypeComponent.java
  8. package com.sun.corba.se.internal.ior;
  9. import org.omg.IOP.TAG_ORB_TYPE ;
  10. import com.sun.corba.se.internal.ior.TaggedComponent ;
  11. import org.omg.CORBA_2_3.portable.OutputStream ;
  12. /**
  13. * @author
  14. */
  15. public class ORBTypeComponent extends TaggedComponentBase
  16. {
  17. private int ORBType;
  18. public boolean equals( Object obj )
  19. {
  20. if (obj == null)
  21. return false ;
  22. if (!(obj instanceof ORBTypeComponent))
  23. return false ;
  24. ORBTypeComponent other = (ORBTypeComponent)obj ;
  25. return ORBType == other.ORBType ;
  26. }
  27. public String toString()
  28. {
  29. return "ORBTypeComponent[ORBType=" + ORBType + "]" ;
  30. }
  31. /**
  32. * @param arg0
  33. * @return
  34. * @exception
  35. * @author
  36. * @roseuid 3910984F01AA
  37. */
  38. public ORBTypeComponent(int ORBType)
  39. {
  40. this.ORBType = ORBType ;
  41. }
  42. /**
  43. * @return int
  44. * @exception
  45. * @author
  46. * @roseuid 3910984F01AE
  47. */
  48. public int getId()
  49. {
  50. return TAG_ORB_TYPE.value ; // 0 in CORBA 2.3.1 13.6.3
  51. }
  52. /**
  53. * @return int
  54. * @exception
  55. * @author
  56. * @roseuid 3910984F01AF
  57. */
  58. public int getORBType()
  59. {
  60. return ORBType ;
  61. }
  62. /**
  63. * @param arg0
  64. * @return void
  65. * @exception
  66. * @author
  67. * @roseuid 3910984F01B4
  68. */
  69. public void writeContents(OutputStream os)
  70. {
  71. os.write_ulong( ORBType ) ;
  72. }
  73. }