KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > ior > OldObjectKeyTemplateBase


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
8 package com.sun.corba.se.impl.ior;
9
10 import com.sun.corba.se.spi.ior.ObjectAdapterId ;
11
12 import org.omg.CORBA_2_3.portable.OutputStream JavaDoc ;
13
14 import com.sun.corba.se.spi.orb.ORB ;
15 import com.sun.corba.se.spi.orb.ORBVersion ;
16 import com.sun.corba.se.spi.orb.ORBVersionFactory ;
17
18 import com.sun.corba.se.impl.ior.ObjectKeyFactoryImpl ;
19
20 /**
21  * @author Ken Cavanaugh
22  */

23 public abstract class OldObjectKeyTemplateBase extends ObjectKeyTemplateBase
24 {
25     public OldObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid,
26     String JavaDoc orbid, ObjectAdapterId oaid )
27     {
28     super( orb, magic, scid, serverid, orbid, oaid ) ;
29
30     // set version based on magic
31
if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_OLD)
32         setORBVersion( ORBVersionFactory.getOLD() ) ;
33     else if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW)
34         setORBVersion( ORBVersionFactory.getNEW() ) ;
35     else // any other magic should not be here
36
throw wrapper.badMagic( new Integer JavaDoc( magic ) ) ;
37     }
38 }
39
Popular Tags