1. /*
  2. * @(#)JIDLObjectKeyTemplate.java 1.18 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/JIDLObjectKeyTemplate.java
  8. package com.sun.corba.se.internal.ior;
  9. import com.sun.corba.se.internal.ior.ObjectId ;
  10. import com.sun.corba.se.internal.ior.ObjectKeyFactory ;
  11. import org.omg.CORBA_2_3.portable.OutputStream ;
  12. import com.sun.corba.se.internal.iiop.CDRInputStream ;
  13. import com.sun.corba.se.internal.iiop.CDROutputStream ;
  14. import com.sun.corba.se.internal.core.ORBVersion ;
  15. import com.sun.corba.se.internal.core.ORBVersionFactory ;
  16. import org.omg.CORBA.ORB ;
  17. import org.omg.CORBA.OctetSeqHolder ;
  18. /**
  19. * @author
  20. */
  21. public final class JIDLObjectKeyTemplate extends NewObjectKeyTemplateBase
  22. {
  23. public JIDLObjectKeyTemplate( int magic, int scid, CDRInputStream is,
  24. OctetSeqHolder osh )
  25. {
  26. super( magic, scid, is.read_long() );
  27. osh.value = readObjectKey( is ) ;
  28. setVersion( is ) ;
  29. }
  30. /**
  31. * @param scid
  32. * @param serverid
  33. * @return
  34. * @exception
  35. * @author
  36. * @roseuid 3915FF9803AA
  37. */
  38. public JIDLObjectKeyTemplate( int scid, int serverid)
  39. {
  40. super( ObjectKeyTemplate.JAVAMAGIC_NEWER, scid, serverid ) ;
  41. setORBVersion( ORBVersionFactory.getORBVersion() ) ;
  42. }
  43. protected void write( OutputStream os )
  44. {
  45. os.write_long( getMagic() ) ;
  46. os.write_long( getSubcontractId() ) ;
  47. os.write_long( getServerId() ) ;
  48. }
  49. }