FileDocCategorySizeDatePackage
IORFactories.javaAPI DocJava SE 5 API5188Fri Aug 26 14:54:36 BST 2005com.sun.corba.se.spi.ior

IORFactories

public class IORFactories extends Object
This class provides a number of factory methods for creating various IOR SPI classes which are not subclassed for specific protocols. The following types must be created using this class:
  • ObjectId
  • ObjectKey
  • IOR
  • IORTemplate

Fields Summary
Constructors Summary
private IORFactories()

Methods Summary
public static com.sun.corba.se.spi.ior.IORgetIOR(org.omg.CORBA.Object obj)

	return ORBUtility.getIOR( obj ) ;
    
public static com.sun.corba.se.spi.ior.IORFactorygetIORFactory(org.omg.PortableInterceptor.ObjectReferenceTemplate ort)

	if (ort instanceof ObjectReferenceTemplateImpl) {
	    ObjectReferenceTemplateImpl orti = 
		(ObjectReferenceTemplateImpl)ort ;
	    return orti.getIORFactory() ;
	}

	throw new BAD_PARAM() ;
    
public static com.sun.corba.se.spi.ior.IORTemplateListgetIORTemplateList(org.omg.PortableInterceptor.ObjectReferenceFactory orf)

	if (orf instanceof ObjectReferenceProducerBase) {
	    ObjectReferenceProducerBase base =
		(ObjectReferenceProducerBase)orf ;
	    return base.getIORTemplateList() ;
	}

	throw new BAD_PARAM() ;
    
public static com.sun.corba.se.spi.ior.IORmakeIOR(com.sun.corba.se.spi.orb.ORB orb, java.lang.String typeid)
Create an empty IOR for the given orb and typeid. The result is mutable.

	return new IORImpl( orb, typeid ) ;
    
public static com.sun.corba.se.spi.ior.IORmakeIOR(com.sun.corba.se.spi.orb.ORB orb)
Create an empty IOR for the given orb with a null typeid. The result is mutable.

	return new IORImpl( orb ) ;
    
public static com.sun.corba.se.spi.ior.IORmakeIOR(org.omg.CORBA_2_3.portable.InputStream is)
Read an IOR from an InputStream. ObjectKeys are not shared.

	return new IORImpl( is ) ;
    
public static com.sun.corba.se.spi.ior.IORTemplatemakeIORTemplate(com.sun.corba.se.spi.ior.ObjectKeyTemplate oktemp)
Create an IORTemplate with the given ObjectKeyTemplate. The result is mutable.

	return new IORTemplateImpl( oktemp ) ;
    
public static com.sun.corba.se.spi.ior.IORTemplatemakeIORTemplate(org.omg.CORBA_2_3.portable.InputStream is)
Read an IORTemplate from an InputStream.

	return new IORTemplateImpl( is ) ;
    
public static com.sun.corba.se.spi.ior.IORTemplateListmakeIORTemplateList(org.omg.CORBA_2_3.portable.InputStream is)

	return new IORTemplateListImpl( is ) ;
    
public static com.sun.corba.se.spi.ior.IORTemplateListmakeIORTemplateList()

	return new IORTemplateListImpl() ;
    
public static com.sun.corba.se.spi.ior.ObjectIdmakeObjectId(byte[] id)
Create an ObjectId for the given byte sequence.

	return new ObjectIdImpl( id ) ;
    
public static com.sun.corba.se.spi.ior.ObjectKeymakeObjectKey(com.sun.corba.se.spi.ior.ObjectKeyTemplate oktemp, com.sun.corba.se.spi.ior.ObjectId oid)
Create an ObjectKey for the given ObjectKeyTemplate and ObjectId.

	return new ObjectKeyImpl( oktemp, oid ) ;
    
public static com.sun.corba.se.spi.ior.ObjectKeyFactorymakeObjectKeyFactory(com.sun.corba.se.spi.orb.ORB orb)

	return new ObjectKeyFactoryImpl( orb ) ;
    
public static org.omg.CORBA.ObjectmakeObjectReference(com.sun.corba.se.spi.ior.IOR ior)

	return ORBUtility.makeObjectReference( ior ) ;
    
public static org.omg.PortableInterceptor.ObjectReferenceFactorymakeObjectReferenceFactory(com.sun.corba.se.spi.orb.ORB orb, com.sun.corba.se.spi.ior.IORTemplateList iortemps)

	return new ObjectReferenceFactoryImpl( orb, iortemps ) ;
    
public static org.omg.PortableInterceptor.ObjectReferenceTemplatemakeObjectReferenceTemplate(com.sun.corba.se.spi.orb.ORB orb, com.sun.corba.se.spi.ior.IORTemplate iortemp)

	return new ObjectReferenceTemplateImpl( orb, iortemp ) ;
    
public static voidregisterValueFactories(com.sun.corba.se.spi.orb.ORB orb)
This method must be called in order to register the value factories for the ObjectReferenceTemplate and ObjectReferenceFactory value types.

	// Create and register the factory for the Object Reference Template
	// implementation.
	ValueFactory vf = new ValueFactory() {
	    public Serializable read_value( InputStream is ) 
	    {
		return new ObjectReferenceTemplateImpl( is ) ;
	    }
	} ;

	orb.register_value_factory( ObjectReferenceTemplateImpl.repositoryId, vf ) ;

	// Create and register the factory for the Object Reference Factory
	// implementation.
	vf = new ValueFactory() {
	    public Serializable read_value( InputStream is ) 
	    {
		return new ObjectReferenceFactoryImpl( is ) ;
	    }
	} ;

	orb.register_value_factory( ObjectReferenceFactoryImpl.repositoryId, vf ) ;