1. /*
  2. * @(#)JavaCodebaseComponent.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/JavaCodebaseComponent.java
  8. package com.sun.corba.se.internal.ior;
  9. import org.omg.IOP.TAG_JAVA_CODEBASE ;
  10. import org.omg.CORBA_2_3.portable.OutputStream ;
  11. import com.sun.corba.se.internal.ior.TaggedComponentBase ;
  12. /**
  13. * @author
  14. */
  15. public class JavaCodebaseComponent extends TaggedComponentBase
  16. {
  17. private String URLs ;
  18. public boolean equals( Object obj )
  19. {
  20. if (obj == null)
  21. return false ;
  22. if (!(obj instanceof JavaCodebaseComponent))
  23. return false ;
  24. JavaCodebaseComponent other = (JavaCodebaseComponent)obj ;
  25. return URLs.equals( other.getURLs() ) ;
  26. }
  27. public String toString()
  28. {
  29. return "JavaCodebaseComponent[URLs=" + URLs + "]" ;
  30. }
  31. public String getURLs()
  32. {
  33. return URLs ;
  34. }
  35. /**
  36. * @return
  37. * @exception
  38. * @author
  39. * @roseuid 3910984E02E9
  40. */
  41. public JavaCodebaseComponent( String URLs )
  42. {
  43. this.URLs = URLs ;
  44. }
  45. /**
  46. * @param arg0
  47. * @return void
  48. * @exception
  49. * @author
  50. * @roseuid 3913261302A3
  51. */
  52. public void writeContents(OutputStream os)
  53. {
  54. os.write_string( URLs ) ;
  55. }
  56. /**
  57. * @return int
  58. * @exception
  59. * @author
  60. * @roseuid 391326140150
  61. */
  62. public int getId()
  63. {
  64. return TAG_JAVA_CODEBASE.value ; // 25 in CORBA 2.3.1 13.6.3
  65. }
  66. }