FileDocCategorySizeDatePackage
ORBVersionFactory.javaAPI DocJava SE 5 API2591Fri Aug 26 14:54:38 BST 2005com.sun.corba.se.spi.orb

ORBVersionFactory

public class ORBVersionFactory extends Object

Fields Summary
Constructors Summary
private ORBVersionFactory()

Methods Summary
private static com.sun.corba.se.spi.orb.ORBVersionbyteToVersion(byte value)

	/* Throwing an exception here would cause this version to be 
	* incompatible with future versions of the ORB, to the point 
	* that this version could
	* not even unmarshal objrefs from a newer version that uses 
	* extended versioning.  Therefore, we will simply treat all 
	* unknown versions as the latest version.
	if (value < 0)
	    throw new INTERNAL() ;
	*/

	/**
	 * Update: If we treat all unknown versions as the latest version
	 * then when we send an IOR with a PEORB version to an ORB that
	 * doesn't know the PEORB version it will treat it as whatever
	 * its idea of the latest version is.  Then, if that IOR is
	 * sent back to the server and compared with the original
	 * the equality check will fail because the versions will be
	 * different.
	 *
	 * Instead, just capture the version bytes.
	 */

	switch (value) {
	    case ORBVersion.FOREIGN : return ORBVersionImpl.FOREIGN ;
	    case ORBVersion.OLD : return ORBVersionImpl.OLD ;
	    case ORBVersion.NEW : return ORBVersionImpl.NEW ;
            case ORBVersion.JDK1_3_1_01: return ORBVersionImpl.JDK1_3_1_01 ;
	    case ORBVersion.NEWER : return ORBVersionImpl.NEWER ;
	    case ORBVersion.PEORB : return ORBVersionImpl.PEORB ;
	    default : return new ORBVersionImpl(value); 
	}
    
public static com.sun.corba.se.spi.orb.ORBVersioncreate(org.omg.CORBA.portable.InputStream is)

	byte value = is.read_octet() ;
	return byteToVersion( value ) ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetFOREIGN()

	return ORBVersionImpl.FOREIGN ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetJDK1_3_1_01()

	return ORBVersionImpl.JDK1_3_1_01 ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetNEW()

	return ORBVersionImpl.NEW ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetNEWER()

	return ORBVersionImpl.NEWER ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetOLD()

	return ORBVersionImpl.OLD ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetORBVersion()
Return the current version of this ORB

	return ORBVersionImpl.PEORB ;
    
public static com.sun.corba.se.spi.orb.ORBVersiongetPEORB()

	return ORBVersionImpl.PEORB ;