public OldObjectKeyTemplateBase(ORB orb, int magic, int scid, int serverid, String orbid, ObjectAdapterId oaid) { super(orb, magic, scid, serverid, orbid, oaid); // set version based on magic if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_OLD) setORBVersion(ORBVersionFactory.getOLD()); else if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW) setORBVersion(ORBVersionFactory.getNEW()); else // any other magic should not be here throw wrapper.badMagic(new Integer(magic)); } }
public OldObjectKeyTemplateBase(ORB orb, int magic, int scid, int serverid, String orbid, ObjectAdapterId oaid) { super(orb, magic, scid, serverid, orbid, oaid); // set version based on magic if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_OLD) setORBVersion(ORBVersionFactory.getOLD()); else if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW) setORBVersion(ORBVersionFactory.getNEW()); else // any other magic should not be here throw wrapper.badMagic(new Integer(magic)); } }
public ORBVersion getORBVersion() { if (getMagic() == ObjectKeyFactoryImpl.JAVAMAGIC_OLD) return ORBVersionFactory.getOLD(); else if (getMagic() == ObjectKeyFactoryImpl.JAVAMAGIC_NEW) return ORBVersionFactory.getNEW(); else throw new INTERNAL(); } }
public ORBVersion getORBVersion() { if (getMagic() == ObjectKeyFactoryImpl.JAVAMAGIC_OLD) return ORBVersionFactory.getOLD(); else if (getMagic() == ObjectKeyFactoryImpl.JAVAMAGIC_NEW) return ORBVersionFactory.getNEW(); else throw new INTERNAL(); } }
/** * Creates the correct ValueHandler for the given ORB, querying ORBVersion information. If the ORB or ORBVersion is * null, gets the ValueHandler from Util.createValueHandler. */ public static ValueHandler createValueHandler(ORB orb) { if (orb == null) return Util.createValueHandler(); ORBVersion version = orb.getORBVersion(); if (version == null) return Util.createValueHandler(); if (version.equals(ORBVersionFactory.getOLD())) return new ValueHandlerImpl_1_3(); if (version.equals(ORBVersionFactory.getNEW())) return new ValueHandlerImpl_1_3_1(); return Util.createValueHandler(); }
/** * Creates the correct ValueHandler for the given ORB, querying ORBVersion information. If the ORB or ORBVersion is * null, gets the ValueHandler from Util.createValueHandler. */ public static ValueHandler createValueHandler(ORB orb) { if (orb == null) return Util.createValueHandler(); ORBVersion version = orb.getORBVersion(); if (version == null) return Util.createValueHandler(); if (version.equals(ORBVersionFactory.getOLD())) return new ValueHandlerImpl_1_3(); if (version.equals(ORBVersionFactory.getNEW())) return new ValueHandlerImpl_1_3_1(); return Util.createValueHandler(); }