1. /*
  2. * @(#)OldObjectKeyTemplateBase.java 1.9 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.ior;
  8. import com.sun.corba.se.spi.ior.ObjectAdapterId ;
  9. import org.omg.CORBA_2_3.portable.OutputStream ;
  10. import com.sun.corba.se.spi.orb.ORB ;
  11. import com.sun.corba.se.spi.orb.ORBVersion ;
  12. import com.sun.corba.se.spi.orb.ORBVersionFactory ;
  13. import com.sun.corba.se.impl.ior.ObjectKeyFactoryImpl ;
  14. /**
  15. * @author Ken Cavanaugh
  16. */
  17. public abstract class OldObjectKeyTemplateBase extends ObjectKeyTemplateBase
  18. {
  19. public OldObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid,
  20. String orbid, ObjectAdapterId oaid )
  21. {
  22. super( orb, magic, scid, serverid, orbid, oaid ) ;
  23. // set version based on magic
  24. if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_OLD)
  25. setORBVersion( ORBVersionFactory.getOLD() ) ;
  26. else if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW)
  27. setORBVersion( ORBVersionFactory.getNEW() ) ;
  28. else // any other magic should not be here
  29. throw wrapper.badMagic( new Integer( magic ) ) ;
  30. }
  31. }