本文整理汇总了Java中com.sun.corba.se.spi.ior.IORTemplate类的典型用法代码示例。如果您正苦于以下问题:Java IORTemplate类的具体用法?Java IORTemplate怎么用?Java IORTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IORTemplate类属于com.sun.corba.se.spi.ior包,在下文中一共展示了IORTemplate类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BootstrapResolverImpl
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public BootstrapResolverImpl(ORB orb, String host, int port) {
wrapper = ORBUtilSystemException.get( orb,
CORBALogDomains.ORB_RESOLVER ) ;
// Create a new IOR with the magic of INIT
byte[] initialKey = "INIT".getBytes() ;
ObjectKey okey = orb.getObjectKeyFactory().create(initialKey) ;
IIOPAddress addr = IIOPFactories.makeIIOPAddress( orb, host, port ) ;
IIOPProfileTemplate ptemp = IIOPFactories.makeIIOPProfileTemplate(
orb, GIOPVersion.V1_0, addr);
IORTemplate iortemp = IORFactories.makeIORTemplate( okey.getTemplate() ) ;
iortemp.add( ptemp ) ;
IOR initialIOR = iortemp.makeIOR( (com.sun.corba.se.spi.orb.ORB)orb,
"", okey.getId() ) ;
bootstrapDelegate = ORBUtility.makeClientDelegate( initialIOR ) ;
}
示例2: isEquivalent
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public boolean isEquivalent( IORFactory other )
{
if (!(other instanceof IORTemplate))
return false ;
IORTemplate list = (IORTemplate)other ;
Iterator thisIterator = iterator() ;
Iterator listIterator = list.iterator() ;
while (thisIterator.hasNext() && listIterator.hasNext()) {
TaggedProfileTemplate thisTemplate =
(TaggedProfileTemplate)thisIterator.next() ;
TaggedProfileTemplate listTemplate =
(TaggedProfileTemplate)listIterator.next() ;
if (!thisTemplate.isEquivalent( listTemplate ))
return false ;
}
return (thisIterator.hasNext() == listIterator.hasNext()) &&
getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
示例3: isEquivalent
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public boolean isEquivalent( IORFactory other )
{
if (!(other instanceof IORTemplateList))
return false ;
IORTemplateList list = (IORTemplateList)other ;
Iterator thisIterator = iterator() ;
Iterator listIterator = list.iterator() ;
while (thisIterator.hasNext() && listIterator.hasNext()) {
IORTemplate thisTemplate = (IORTemplate)thisIterator.next() ;
IORTemplate listTemplate = (IORTemplate)listIterator.next() ;
if (!thisTemplate.isEquivalent( listTemplate ))
return false ;
}
return thisIterator.hasNext() == listIterator.hasNext() ;
}
示例4: addToIORTemplate
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public void addToIORTemplate(IORTemplate iorTemplate,
Policies policies,
String codebase,
String objectAdapterManagerId,
ObjectAdapterId objectAdapterId)
{
Iterator iterator =
getAcceptors(objectAdapterManagerId, objectAdapterId).iterator();
while (iterator.hasNext()) {
CorbaAcceptor acceptor = (CorbaAcceptor) iterator.next();
acceptor.addToIORTemplate(iorTemplate, policies, codebase);
}
}
示例5: set
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public Object set( int index, Object element )
{
if (element instanceof IORTemplate) {
return super.set( index, element ) ;
} else if (element instanceof IORTemplateList) {
Object result = remove( index ) ;
add( index, element ) ;
return result ;
} else
throw new IllegalArgumentException() ;
}
示例6: add
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public void add( int index, Object element )
{
if (element instanceof IORTemplate) {
super.add( index, element ) ;
} else if (element instanceof IORTemplateList) {
IORTemplateList tl = (IORTemplateList)element ;
addAll( index, tl ) ;
} else
throw new IllegalArgumentException() ;
}
示例7: IORTemplateListImpl
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public IORTemplateListImpl( InputStream is )
{
this() ;
int size = is.read_long() ;
for (int ctr=0; ctr<size; ctr++) {
IORTemplate iortemp = IORFactories.makeIORTemplate( is ) ;
add( iortemp ) ;
}
makeImmutable() ;
}
示例8: write
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
public void write( OutputStream os )
{
os.write_long( size() ) ;
Iterator iter = iterator() ;
while (iter.hasNext()) {
IORTemplate iortemp = (IORTemplate)(iter.next()) ;
iortemp.write( os ) ;
}
}
示例9: IORImpl
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
/** Construct an IOR from an IORTemplate by applying the same
* object id to each TaggedProfileTemplate in the IORTemplate.
*/
public IORImpl( ORB orb, String typeId, IORTemplate iortemp, ObjectId id)
{
this( orb, typeId ) ;
this.iortemps = IORFactories.makeIORTemplateList() ;
this.iortemps.add( iortemp ) ;
addTaggedProfiles( iortemp, id ) ;
makeImmutable() ;
}
示例10: addTaggedProfiles
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
private void addTaggedProfiles( IORTemplate iortemp, ObjectId id )
{
ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate() ;
Iterator templateIterator = iortemp.iterator() ;
while (templateIterator.hasNext()) {
TaggedProfileTemplate ptemp =
(TaggedProfileTemplate)(templateIterator.next()) ;
TaggedProfile profile = ptemp.create( oktemp, id ) ;
add( profile ) ;
}
}
示例11: initializeIORTemplateList
import com.sun.corba.se.spi.ior.IORTemplate; //导入依赖的package包/类
private void initializeIORTemplateList()
{
// Maps ObjectKeyTemplate to IORTemplate
Map oktempToIORTemplate = new HashMap() ;
iortemps = IORFactories.makeIORTemplateList() ;
Iterator iter = iterator() ;
ObjectId oid = null ; // used to check that all profiles have the same oid.
while (iter.hasNext()) {
TaggedProfile prof = (TaggedProfile)(iter.next()) ;
TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;
// Check that all oids for all profiles are the same: if they are not,
// throw exception.
if (oid == null)
oid = prof.getObjectId() ;
else if (!oid.equals( prof.getObjectId() ))
throw wrapper.badOidInIorTemplateList() ;
// Find or create the IORTemplate for oktemp.
IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
if (iortemp == null) {
iortemp = IORFactories.makeIORTemplate( oktemp ) ;
oktempToIORTemplate.put( oktemp, iortemp ) ;
iortemps.add( iortemp ) ;
}
iortemp.add( ptemp ) ;
}
iortemps.makeImmutable() ;
}